President Reagan immediately seized his defeat on the balanced-budget constitutional amendment yesterday as a weapon against Democrats in the fall congressional election campaign, saying "voters across America should count heads and take names" of those who opposed the measure.

White House officials are deeply concerned that Republicans will suffer sizable losses in races for Congress and governerships if voters focus too much on rising unemployment and the stalled economy.

Even though Reagan has presided over the largest peacetime budget deficits in American history, the White House believes the balanced-budget amendment is a profitable issue for Reagan because it underscores his avowed intent to slash the size of government regardless of the deficits.

"Today I share the deep burning anger, I think, of millions of Americans," Reagan told reporters after the House defeated a constitutional amendment to balance the budget that he had endorsed.

"Despite stonewalling by the Democratic leadership of the House of Representatives, a majority of . . . House members finally forced a vote on the balanced-budget tax-limitation amendment. Tragically, and for purely partisan reasons, these same House Democrats who didn't want the vote have again played politics with the will of the people."

Even as Reagan lamented the amendment's defeat, White House officials saw it as a welcome opportunity for him to exploit during the last month of the campaign.

"We bought a major issue," said one senior administration official, who called the House vote a "significant victory." He added: "It's going to be a damn good campaign issue."

"For us, it's a no-lose issue," said one senior official.

Reagan offered a preview of the approach he plans to take in campaigning for Republicans in several states next week when asked whether he was "beat" by House Speaker Thomas P. (Tip) O'Neill Jr. (D-Mass). No, Reagan said of the speaker, "He beat the American people."

Despite his House defeat and the jubilation of many Democrats, "Reagan still wins," said Rep. Norman Y. Mineta, (D-Calif.), a member of the House Budget Committee. "This whole excercise is to take the focus away from unemployment and the economy. He can keep the focus off his own shortcomings and blame it all on the Democrats."

Reagan has sharply intensified this theme since his Tuesday news conference, refusing to take any blame for the economy's performance. "It was year after year of government living beyond its means that plunged our nation into a deep, painful mess," he said yesterday.

"Yet today, incredibly, we heard the House leadership still claiming a balanced budget would wreck the economy."

The president vowed "we'll fight on" by bringing up the amendment next year, saying the measure had "overwhelming" support among the American people and had won a "clear majority of the House," although not the two-thirds required for passage.

White House officials said the majority vote was an important benchmark, reinforcing Reagan's claim that only a "minority" of Democrats stood in the way.

"The leadership of the House pasted together a phony, last-minute political sham with no teeth in it which failed to pass," Reagan said in his appearance in the White House briefing room. "Their only concern was to defeat a real balanced-budget tax-limitation amendment, and this they finally were able to do. They have choked off chances for a balanced-budget amendment this year.

"This vote today makes clear who supports a balanced-budget amendment and who does not," Reagan said. "Voters across America should count heads and take names. In November we must elect representatives who support the amendment."

Reagan, reflecting the views of his strategists, said he would have liked more time to build support for the measure. "If we had had more time for the people to know what was going on . . . Congress might have acted differently," he said.

But the president did not mount a full-court press to round up votes for the amendment. "If we win, we win, and if we lose, we win," said one aide in summing up the White House view before the balloting yesterday.

Reagan brushed aside the contention of Democrats that the amendment would force a drastic reordering of the federal budget. Had it passed, he said, there would be "plenty of time to bring it under control without devastating a number of worthwhile programs that people are dependent on."

Asked if he would try to balance the budget by 1986 on his own, he added: "I would be willing to go at it." However, Reagan pledged only this week not to raise taxes again next year, a decision that some administration officials think will swell federal deficits even further.