A federal judge here yesterday criticized The Washington Post management for its decision to terminate its relationship with five news dealers who brought a lengthy antitrust suit against the manner in which the company distributes its papers.

U.S. District Judge Gerhard A. Gesell said the Post action was clearly legal under the law since the dealers' contracts were expiring and that he would uphold it. However, he added, his decision under the law is "contrary to my conscience and contrary to my sense of fair play."

He said the newspaper "holds itself out to this community as a strong defender" of the underdog, "except, it appears to me here, they have chosen not to follow that course when their own economic interest is involved."

Gesell said both sides of the dispute have "lost their common sense . . . this is the time for some sober thought on both sides."

The dealers, who have between 11 and 22 years of service for the Post, will receive at least $17,500 each from a company profit incentive plan, the Post said.

The post said in court papers that it did not feel it could continue to deal "harmoniously" with the dealers, and one Post circulation executive said in an affidavit the plaintiffs had "diminished the morale of Circulation Department personnel and impaired the efficiency of the operations of the department."

"No one is rejoicing over this decision," a Post attorney told Gesell in court yesterday.

Gesell's rare, personal emotional outpouring came in a request by the terminated dealers that The Post be forced to sign new contracts with them pending an appeal of his earlier decision in the lawsuit.

That September decision found that a new agency distribution system implemented by the paper to replace its former dealer system is legal and can continue to operate.

In addition, he found that newspapers who do use a dealer system cannot stop those dealers from charging their customers more for the paper than the amount suggested by the publisher.

At the same time, Gesell ruled that the paper must pay damages to three of its dealers who the court ruled were punished financially by The Post for raising the price of the paper to their customers. Gesell since has approved the payment of attorneys' fees to lawyers for some of the plaintiffs.

The controversy arose when the company switched from a dealer system - in which dealers purchase newspapers from a newspaper for resale - to an agency system, under which distribution is handled more directly by the newspaper through agents.

All but 14 of the Post's 180 dealers accepted the agency system when it was announced by the company in 1975.

Christopher Little, vice president and counsel for the Post, said the company does not agree with Gesell's characterization of the recent action concerning the five plaintiffs. Instead, he said, the company "agrees with Judge Gesell's earlier statements in the case that our shift to the agency system in 1975 was made in 'sensitive and appropriate ways' and also his statement that the litigation involving these 14 dealers has been bitter."