Republican Paul S. Trible and Democrat Richard J. Davis are locked in a virtual dead heat in their race for the U.S. Senate in Virginia, according to their own campaign pollsters and a new statewide poll released yesterday.

An Associated Press/WRC-TV telephone poll of 1,034 likely voters interviewed late last week shows Davis, the state's lieutenant governor, with a 41-to-39 percent edge over Trible, a congressman from Newport News. With nearly one out of every five voters undecided, the lead is statistically insignificant, given the poll's 4 percent margin of error.

The new poll appears to confirm the view of campaign pollsters that this year's race to succeed the retiring Sen. Harry F. Byrd Jr. is the closest statewide election since 1978 when Republican John W. Warner edged out Democrat Andrew P. Miller for the Senate by 15,000 votes out of 1.2 million.

"I tell you, it's going to be a tight one," said Judy Peachee, Trible's campaign manager. "It was just like this in the Warner race. Warner would run some media and then jump ahead by two points, then Miller would do some and jump up three points. It's just too close to call."

"This is going to be one of those races that goes down to the wire," said Democratic pollster Peter Hart, who is working for Davis. "But Davis has done well and the campaign has gone well. We're encouraged, but we're taking nothing for granted."

The new poll also showed President Reagan maintains a relatively high popularity rating in Virginia, despite the country's worst unemployment rate since the Great Depression. Fifty-eight percent of those polled said they blame previous administrations for the country's economic problems, while only 18 percent blame Reagan.

The AP poll, coming only two weeks after a Richmond newspaper poll had Trible four points ahead, suggests that Davis has gained somewhat from his $275,000 media campaign, including a hard-hitting radio commercial attacking Trible's attendance record in the House. "When you do $300,000 worth of media, that has to have an impact," Peachee said. "Even so, he didn't move out, he didn't surge ahead."

There were signs yesterday the Trible camp is worried over the Davis ads, which accuse the 35-year-old GOP representative of the "worst attendance record of any Virginia congressman in the last decade." Trible began running a 60-second rebuttal ad that accuses Davis of misrepresenting his record. "We were getting telephone calls from our people, saying we've got to say something," said Peachee.

Yesterday's poll shows that Davis, a former Portsmouth mayor, has opened up a 43 percent to 35 percent lead in Northern Virginia, a key battleground in the election and an area where both candidates are relatively unknown. More significantly, perhaps, is that Davis has virtually locked up the anti-Reagan vote in the state, leading among voters who believe the president has done a "poor" job by a lopsided 79 percent to 6 percent margin.

Despite a campaign appearance by Reagan in Richmond two weeks ago, Trible has apparently failed to register quite as strongly among supporters of the president. Among those who approve of Reagan, 67 percent favor Trible, 14 percent favor Davis and 19 percent are undecided.

A spokesman for NBC News in New York, which conducted the poll, said the numbers involving Reagan could be crucial because of the president's relatively high standing in Virginia. The poll showed that 46 percent of those sampled believe the president is doing either an "excellent" or "good" job.

"The expectation would be that Trible would be ahead at this stage given the generally favorable opinion that people have of Reagan," the spokesman said. "Yet Trible is still running neck and neck. That suggests a problem for Trible."

Trible's tough stand in favor of the death penalty may be working for him, according to the poll. It found 74 percent of those sampled favor the death penalty in some form, while only 18 percent are against it as Davis is. Trible has sought to capitalize on pro-death penalty sentiment in the state, claiming in a speech and press release last week that the Tylenol-related deaths in Chicago point up the need for capital punishment.