Mounting frustration and fear about the federal deficit has created enormous pressure in Congress for an automatic deficit reduction measure, but a small number of holdouts have refused to support the bill, including Sen. Paul S. Sarbanes (D-Md.) and Sen. Charles McC. Mathias Jr. (R-Md.).

When questioned, the two Maryland senators respond that it is simply a bad idea.

Sarbanes and Mathias are hardly unique in their assessment of the automatic deficit reduction proposal. Far more senators than the 25 who voted against the measure have assailed the concept. But it nevertheless was approved overwhelmingly in the Senate, because so many of the members are frustrated over the growing federal deficit.

The Senate and House have passed differing versions of a measure that would set declining statutory limits on the federal deficit each year, forcing a balanced budget over five years. If the deficit exceeded the statutory limit for that year, there would be automatic, across-the-board cuts. House and Senate leaders hope to work out a compromise after Congress returns today from its Thanksgiving recess.

All Democratic House members from Maryland and Virginia voted for the Democratic balanced budget proposal, which won House approval. All Maryland and Virginia Republican House members voted for the Senate proposal, which was unsuccessfully offered in the House as a substitute for the Democratic bill.

Virginia's two Republican senators, John W. Warner and Paul S. Trible, supported the Senate measure, called the Gramm-Rudman-Hollings deficit reduction bill, for its sponsors, Sens. Phil Gramm (R-Tex.), Warren B. Rudman (R-N.H.) and Ernest F. Hollings (D-S.C.).

Most Maryland and Virginia members of Congress concede that public pressure is building on the deficit issue. They say that when they meet with constituents, the federal deficit -- currently estimated at $212 billion -- is the foremost question. Voters want to know why Congress has done nothing to solve the problem and if Congress will do anything soon.

"Obviously [by not voting for it] people think they are leaving themselves open to the charge that they're not for balancing the budget, which is really a ridiculous charge," Sarbanes said. "The question is whether you can be held to task for not falling for phony gimmicks."

Sarbanes said he does not expect much political fallout from his opposition to the measure. He said he has heard from constituents who support the bill and from those who fear that it will hurt them by cutting crucial federal programs and assistance.

Sarbanes said he fears that the measure will throw the nation into a deep recession because during an economic downturn the deficit normally increases as tax revenues drop and federal spending rises.The measure "would require these very sweeping cuts . . . that would just keep the economy from getting back on its feet. You'd start to get on your feet, and you'd be slammed right back down again," Sarbanes said.

Sarbanes said he agrees with the bill's supporters that the deficit must be cut. "But I don't think you address it by running the risk of throwing your economy into total chaos." He said Congress could reduce the deficit by stemming the defense buildup and raising taxes, both actions opposed by President Reagan.

Mathias supports tax increases and said he strongly doubts that the automatic deficit reduction approach will solve the deficit problem. The bill "continues the myth that the budget can be balanced solely by spending cuts," Mathias said.

While other members have voiced similar concerns, many believe that the deficit is the biggest threat to the health of the economy. And there is a growing belief that Congress lacks the discipline needed to make cuts large enough to cut the deficit substantially, without the legal requirement hanging over its head.

Rep. Roy P. Dyson (D-Md.), who voted for the House measure, said that regardless of which deficit reduction bill is eventually enacted, he is convinced that there is wasteful spending that can be reduced throughout the government. As an example, he said he recently received a phone call from a Defense Department official who was concerned that the House would reduce the size of the Pentagon's staff of historians from 130 to 108.

"The Defense Department representative wanted to stress to me the importance of the historians. In bragging about the history division, he mentioned their recent accomplishment of publishing an 80-volume historical accounting of World War II. It's hard to imagine who would be likely to read an 80-volume version of a world war," Dyson said.