The House, angry over defense spending increases and the possibility of a pay raise for members of Congress, late last night overwhelmingly rejected a catchall spending bill to keep many government agencies from closing today for lack of funds.

Workers at the affected agencies were under instructions to report as usual this morning regardless of the congressional action, and House leaders were scrambling early today in an attempt to provide stopgap funding to prevent any disruptions.

Efforts by Democratic leaders to win quick House approval for emergency funding through Friday or next Tuesday, Christmas Eve, were blocked by Republican conservatives.

However, the House Rules Committee early this morning paved the way for a vote today on emergency funding to continue the agencies' operations through midnight Thursday, allowing time to work out a compromise.

The surprise 239-to-170 House vote against the measure followed its approval by House-Senate conferees several hours before the 6 p.m. expiration of earlier stopgap funding.

The bill would have provided funding for the rest of fiscal 1986 for the departments of Defense, Agriculture, Transportation, the Interior and Treasury, the General Services Administration, the Office of Personnel Management, the White House and a few other agencies that had not received their regular appropriations for the year from Congress.

It was needed because Congress has passed only six of the regular 13 appropriations bills.

The House-Senate compromise included more money than had been expected for defense, roughly splitting the difference between earlier House and Senate versions, and included funds for resumption of chemical-weapons production while banning tests of antisatellite weapons. It also dropped House proposals for cost-saving revisions in weapons-procurement procedures.

It also authorized an increase in the limit on outside income that members of Congress can earn from speechmaking to special-interest groups, and paved the way for a possible congressional pay increase by making it more difficult for Congress to block proposed pay hikes. The measure would have required action by both houses to overturn a proposed pay increase, rather than the current one-house veto.

Rep. Barney Frank (D-Mass.) attributed rejection of the continuing resolution to defense issues, including earlier agreements to continue limited funding of the MX missile, and rejection of House-proposed procurement revisions. "The path of least resistance has been to go along with the president and Senate," Frank said.

Rep. Lynn M. Martin (R-Ill.) noted the House is often unpredictable on such measures if they are put to a vote late at night, saying: "You should never keep the House after 11. It's like managing a nursery without a nap."

Before the surprise House action, the main threat to the bill appeared to be the possibility of a presidential veto. The conferees' compromise exceeds White House targets for domestic spending in several non-defense areas, although congressional leaders contended that the entire bill of roughly $370 billion was within President Reagan's overall target figure.

Although a veto was still considered possible when the conferees reached agreement, Senate Appropriations Chairman Mark O. Hatfield (R-Ore.) said the White House stopped making overt veto threats after the conferees settled on the high side for defense.

The conferees approved $298.7 billion for defense in fiscal 1986, close to the level necessary to cover inflation.

The congressional pay question had drawn fire both in and outside Congress before the House action, with Fred Wertheimer, president of the lobbying group Common Cause, characterizing the conferees' proposal on raising the honorarium limit as a "Christmas bonus" for members of Congress. With congressional salaries now at $75,100 a year, raising the limit from 30 to 40 percent of that amount would have resulted in a $7,500-a-year allowable increase

The increase would have taken effect immediately for senators; House members would have had to change their own rules before it could have applied to them.

As part of their compromise, the conferees also approved terminating funding for the Synthetic Fuels Corp, but did propose to spend $400 million on clean-coal research to supplant the synfuels money.