The Democratic-controlled House Appropriations Committee yesterday bowed to administration veto threats and trimmed $240 million off its first big spending bill for next year.

The gesture of bipartisanship came as Senate leaders struggled to head off a recess-threatening impasse over an urgent bill to raise the federal debt ceiling, and House Speaker Thomas P. (Tip) O'Neill Jr. (D-Mass.) sought to resolve a testy House-Senate spat over senators' speechmaking earnings.

Warned by Republicans that the president would veto a $14.5 billion energy and water appropriations bill if it was not reduced, the committee agreed to a 3 percent cut in non-defense categories of the bill.

"This is not the scalpel knife approach, it's just a shave to get it signed," said Rep. John T. Myers (R-Ind.). "This is a practical world in which we live," observed committee Chairman Jamie L. Whitten (D-Miss.).

The committee then also approved, without reduction, a $54.2 billion bill for the Department of Housing and Urban Development and 17 independent agencies that Republicans indicated was less of a problem for the administration than the one on energy and water.

It contained nearly $13 billion for subsidized housing, $9.4 billion more than the administration wants, but Rep. Edward P. Boland (D-Mass.) chairman of the Appropriations subcommittee on HUD, noted that that was only half the amount appriated in 1981 before Reagan's budget cuts took effect. "It's crystal clear that housing programs have been cut too severely over the past two years," said Boland.

As the committee was attempting to avoid confrontation with Reagan, who has vowed to veto any money bills he finds excessive, O'Neill was trying to head off a fight with the Senate over a supplemental appropriation that would put a limit of roughly $18,000 on senators' annual earnings from speechmaking.

The provision was prompted by recent reports that senators received a total of $2.4 million from speechmaking last year, including more than $50,000 apiece for at least 15 senators.

In a deal last year between the House and Senate, House members raised their own pay from $60,662 to $69,800 while senators decided to forgo a pay increase in favor of lifting an earlier cap on their outside earned income.

"I think it was a bad move; it showed bad faith," said O'Neill in reference to his House colleagues' efforts to impose financial discipline on reluctant senators, who have threatened, in return, to take away the House members' pay increase. "I don't think in public life we're our brother's keeper as far as the Senate is concerned," he added.

The glow of sweet reason was less apparent on the debt ceiling issue.

Less than a week after it tied itself in knots over the budget and only a few days before the long Memorial Day weekend, the Senate faced one of its periodic tiffs over raising the debt ceiling to keep the government from running out of borrowing authority.

As of late yesterday, amendments were threatened on abortion, school prayer, busing, modification of Reagan's scheduled July tax cut and repeal of withholding on dividends and interest, and "that's just for starters," said a Senate leadership aide.

With the Treasury Department insisting that it needs more borrowing authority by May 31, which falls during the Senate's planned recess, Senate leaders were considering a short extension of a month or less, even though the Finance Committee handily approved, 11 to 5, an extension through the end of the fiscal year Sept. 30.

The leaders' suggested compromise would get everyone out of town on time for Memorial Day and provide ample time for consideration of amendments in June.

But it would require agreement by the House, which had managed to approve a debt extension through Sept. 30 by voice vote last week and was apparently unenthusiastic about voting again on the issue, this time possibly by recorded roll-call vote.