The House, under election-year pressure to do something about the growing U.S. narcotics problem, has passed a controversial anti-drug bill that includes a federal death penalty for drug-related murders.

The bill, approved 375 to 30 on Thursday, would increase penalties for illegal drug use and provide an additional $2 billion in federal funds in the fiscal year that begins Oct. 1 to help law enforcement agencies fight drug dealers and for drug education and treatment programs.With drug use and related crimes up sharply all across the country, members of both parties are trying to show that they are tougher against drugs than their opponents before the Nov. 8 presidential and congressional elections.

Democrats say President Reagan's well publicized anti-drug program during the past eight years has been a failure, despite increased arrests and drug seizures.

The bill would impose mandatory five-year sentences for possession of as little as five grams of crack, a form of cocaine. It creates a so-called "drug czar" to coordinate federal anti-drug programs now run by several agencies including the FBI, Drug Enforcement Administration, Customs Service and Coast Guard.

The death penalty was added as an amendment. The Senate, which considers the bill next, also passed a federal death penalty for drug-related murders as part of another bill.

California Democrat Don Edwards said the bill jeopardized the individual rights of Americans: "If this drug bill becomes law, illegally seized evidence will be admissible in U.S. courts, not only in drug cases, but in all criminal cases."