At just about four minutes after 5 5 last night one half of the House of Representatives abandoned the calm that had marked most of the Great Tax Debate and whooped and cheered in a frenzy of backslapping, exchanging bursts of applause with the public galleries. The other half sat sullen, trying to avoid looking at the electronic vote tally.

It was all over for the Democratic leadership in their fight to stop President Reagan's tax plan, and Speaker Thomas P. O'Neill Jr. (Mass.) sat in the front row, a rumpled gloomy figure gazing intently at nothing in particular. Behind him his troops -- minus the deserters -- huddled in their misery, and just a few yards away across the floor the Republicans reveled in their victory.

All day the House had wrestled with the two competing tax plans, and for the last four or so it was a debate of real passion and considerable dignity, but it was a debate that seemed to be slipping away from the majority. As the afternoon wore on, the Democratic speakers began to make declarations of faith and the Republccans adopted that generous -- often condescending -- tone that winners reserve for the sweet moment of victory.

Ways and Means Chairman Dan Rostenkowski (D-Ill.) looked more and more uncomfortable as Republicans poured compliments on his handling of the tax wrangle and told the Democrats they had done well to move so far in the race to cut taxes. No doubt the president, after a hard morning on the phone was enjoying it, too.

The day began quietly enough with about 50 representatives scattered around the chambner indulging in a polite, and academic, discussion of all the matters on which most of them made their minds up months ago. There are at times an almost soporific atmosphere that must have mystified the crowds who packed the public galleries to watch the fun.

But discerning visitors might have noticed little eddies around the fringes of the chamber: a whispered word here, a gentle tug at the elbow there, a sharp signal from O'Neill to a lieutenant. The battle was raging for those swinging votes all the time.

By mid-afternoon the faces on the floor were telling the story. On the Republican side they were bouncing down the aisles, and contenment shone from every face. Rep. Jack Kemp (R-N.Y.), who is to the taxcutters what the Rev. Jerry Falwell is to the creationists, who was looking sharper than ever -- every hair perfectly in place, his tie-pin twinkling in the TV lights, his hands acknowledging the cheers and grins that culminated in a standing ovation.

Across the way was Rep. Morris K. Udall (D-Ariz.) arguing that neither of the competing plans would protect the economy, nor those of the lowest incomes, but his supporters seemed to know that they could not stem the tide. It was one-way traffic.

So we moved into the last hour before the vote on the Republican plan, and at last the passion began to find its way out. Still, it was a difnified affair. It ended with standing ovations for Rostenkowski and O'Neill from the Republican side. The last crushing blow is delivered with some grace.

From the president's supporters there was talk of setting the people free, and returning to the values of the American dream. Kemp spoke of fulfilling the people's desire to earn and create more wealth as "equity and fairness." From the Democrats there were warnings of eventual economic decline with the Reagan plan, and a rough deal for those at the lower end of the wage scale.

Then from Majority Leader James C. Wright Jr. (D-Tex.) came a quiet speech of real intensity in which he talked of Republicans bringing out the "threadbare remnants" of the 1930s for their policy. Supply-side economics, said Wright, was nothing but the old trickledown theory of Calvin Coolidge and Herbert Hoover.

Finally, after Minority Leader Robert H. Michel (R-Ill.) spoke, O'Neill indulged in some old-fashioned politics. He congratulated companies like Exxon and McDonnell Douglas who, he said, had lobbied at the president's bidding and he glowered across at his opponents, knowing as he did so that they had beaten him.

Their economic policy, favoring the well-off, was not new, he said. They had been doing it through the years. "We know the breeding of them," the speaker growled. That evoked a few hisses, but his own Democrats seemed too tired and depressed to cheer.