Congress, facing a mounting and embarrassing election-year outlay for the hundreds of thousands of items that lawmakers mail free, began moving cautiously yesterday toward healing what Sen. Charles McC. Mathias Jr. (R-Md.) called a "bleeding ulcer."

The Senate took the first step, unanimously adopting a resolution to limit its mailing expenditures for the rest of this fiscal year to half of the estimated $20 million still available from the $100 million Congress appropriated for that purpose at the start of the fiscal year last Oct. 1.

The other half of the $20 million was reserved for the House, where no limits will apply to mailing expenses unless it approves a similar measure. Rep. Vic Fazio (D-Calif.), chairman of the subcommittee that appropriates funds for mailing costs, said he doubted that the House will accept the Senate formula.

The Senate resolution was an attempt to deal with the skyrocketing cost of congressional mail, which Mathias said has more than tripled since 1978, and with a recent General Accounting Office ruling that has radically altered the mail debate.

The GAO ruled that under legislation enacted in 1982, whatever Congress appropriates each year for mailing expenses is considered "full payment" to the Postal Service. If actual costs exceed the appropriation, the Postal Service must absorb them, according to the opinion.

Mathias said the estimated cost this year is $146.2 million, or $46.2 million more than the appropriation, and could go as high as $160 million. Moreover, he noted, the new Gramm-Rudman-Hollings balanced budget law forced a 4.3 percent cut in the original $100 million appropriation, meaning that only $95.7 million is available.

The Senate resolution, sponsored by Mathias and Wendell H. Ford (D-Ky.), imposed an immediate seven-day moratorium on mass mailings such as newsletters to allow time for an accurate estimate of how much money is left. Then half of that will be allocated to senators on the basis of state population. The Senate urged the House to adopt the same restrictions for itself.

By voice vote, the Senate also adopted a resolution sponsored by Dan Quayle (R-Ind.) that would establish a formula for equal Senate-House sharing of the mailing appropriation beginning in fiscal 1987. However, it will not go into effect unless adopted by the House.

"I don't think the House will go along readily," Fazio said. "History shows that the House spends more than half of the money each year. That goes directly to the fact that we are closer to the people on a two-year basis." House members are elected for two-year terms, senators for six.

Earlier this year, Fazio attempted to enact reforms in the mailing system along with a supplemental appropriation of $42 million to cover this year's anticipated extra expenses. He withdrew after Rep. Robert S. Walker (R-Pa.), a gadfly, threatened to force a roll call on the appropriation.

According to Mathias, congressional mail cost $47 million in election year 1978 and dropped to $37.9 million in 1979.