The House yesterday overwhelmingly approved a far-reaching Democratic bill to toughen laws against unfair trade practices and force other countries to reduce "excessive" trade surpluses with the United States.

The bill carried by a 295-to-115 margin, enough to override an almost certain veto, and was sent to the Senate, which is expected to consider a tough trade package of its own. The bill got 236 votes from House Democrats, with only four voting against it.

Despite heavy administration pressure, 59 Republican legislators -- largely from states with industries that have been hard hit by imports -- voted for the bill, which President Reagan denounced as "anti-trade" and "rankly political."

"This protectionist legislation would have our nation violate the most basic tenets of free and fair trade," Reagan said in a speech to the American Retail Federation minutes before the House vote.

"Indeed, it would plunge the world in a trade war, eroding our relation with our allies and free-world trading partners. Economic growth in America would be the casualty."

Nonetheless, Minority Whip Trent Lott (R-Miss.) deserted his party to vote for the bill, as did all but two Republicans from New England, 13 of 20 Republicans from Pennsylvania and Ohio and the entire GOP delegation from North Carolina.

The key provisions of the bill would force the president to act against unfair trade practices of other nations with either quotas or tariffs. The president could retain some flexibility, however, by declaring it would be against the nation's economic interests to take trade action.

The bill also expands the definition of unfair trade practices to include other nations' targeting of specific American industries for export drives, and the cut-rate sale of natural resources such as timber and oil to domestic industries.

It also requires retaliation against countries that bar sales of American telecommunications products.

The most controversial part of the bill, an amendment sponsored by Rep. Richard Gephardt (D-Mo.), is aimed at Japan, Taiwan and West Germany, which would be required to reduce their trade surpluses by 10 percent a year starting in 1987 if they refuse to end what are considered unfair trade practices.

House Speaker Thomas P. (Tip) O'Neill (D-Mass.), who broke through rivalries among House Democrats to get the 458-page bill to the floor, said the measure "sends a historic message that the United States will no longer stand by and watch American industry be replaced by foreign industry."

O'Neill, in his final months as speaker, accused the Reagan administration of refusing to act on trade concerns unless forced by congressional pressure. "The administration listens only to the concerns of our trading competitors," O'Neill said. "It has great sympathy for the nations who compete with us, but seems to have little sympathy for the working men and women of America."

Majority Leader Jim Wright (D-Tex.) denied the measure was protectionist and insisted that provisions designed to force other countries to open their markets to imports makes it "an anti-protectionist bill."

The legislation is the first sweeping trade bill passed by either chamber this year and, if the Republican-controlled Senate takes similar action before the fall recess, could form the basis of a major confrontation with the White House over record trade deficits, which reached $148.5 billion last year.

Senate Majority Leader Robert J. Dole (R-Kan.) has promised that the Senate will act on trade during the summer, although its bill is likely to be more moderate than the House-passed measure.

Before passing the Democratic bill, the House by a 265-to-145 vote defeated a Republican substitute offered by Minority Leader Robert H. Michel (R-Ill.), whose district around Peoria combines agricultural and industrial interests that have been battered by the poor U.S. trade performance.

The Michel substitute left out some of the most stringent parts of the Democratic legislation, although it contained eight of 16 provisions in the House-passed bill that Reagan found the most protectionist. "The administration isn't all that enamored with my bill," Michel acknowledged.

But he decried the partisan nature of the Democratic bill, which he said "indulges in irresponsible excess." He said, "The Democratic leadership seems more interested in picking a fight than solving a problem."

Rep. Dan Rostenkowski (D-Ill.), chairman of the Ways and Means Committee, however, said Democrats were forced to write their own bill because the Reagan administration "virtually refused to discuss trade matters" with Congress and "clearly opposes any congressional meddling in trade affairs."

Republican and Democratic members of the Senate Finance Committee have made the same complaints, which resulted last month in a major confrontation with the White House that nearly scuttled negotiations on a free-trade agreement with Canada.

Yesterday's House vote came after three days of debate on the trade bill, during which a series of Republican amendments to gut the legislation were beaten back.

Among its 239 provisions are some to make the denial of international workers' rights an unfair trade practice; strengthen existing laws against piracy of American products; authorize the president to conduct a new round of global trade talks; establish a trust fund using revenue gained by auctioning quotas to help workers hurt by imports; ease export controls; attempt to stabilize international currency exchanges to make the dollar more competitive, and open new initiatives to deal with the Third World debt.

The measure was attacked immediately by two of America's largest trading partners, Japan and Western Europe. In Tokyo, a spokesman for the Foreign Ministry expressed concerns over Congress' "protectionist overtones," especially those aimed at cutting the nearly $50 billion trade surplus with the United States.