Francois Mitterrand, in the first speech by a French president to the German parliament, today gave an indirect but clear boost to Chancellor Helmut Kohl's election hopes by refusing to support suggestions by Kohl's Social Democratic opponents that France's nuclear force should be taken into account in superpower negotiations on medium-range missiles in Europe.

Instead, Mitterrand, the first Socialist to lead France since 1958, reaffirmed the position that he and Kohl have taken in rejecting Soviet proposals that would make the combined total of 162 missiles possessed by France and Britain the basis for nuclear arms balance in Europe.

The issue of deployment of a new generation of U.S. medium-range missiles in Europe, scheduled to begin in December, has become a major issue in the national West German elections set for March 6. The deployment also has triggered a battle for public opinion throughout Western Europe by the Soviet Union and the United States.

Soviet Foreign Minister Andrei Gromyko left Bonn yesterday after a visit in which he alternately warned the West Germans not to accept the new missiles and called on the West to come forward with new negotiating proposals for the talks in Geneva that would move beyond the Reagan administration's "zero option" opening proposal. The Social Democrats have shown themselves more willing to consider such Russian appeals than have Kohl's Christian Democrats and their allies in the campaign, the Christian Social Union and, to a lesser extent, the Free Democrats.

Mitterrand defended NATO's decision to deploy U.S.-built Pershing II and cruise missiles in Europe at the end of the year if no arms control deal is achieved. He endorsed the U.S. position that NATO will forego deployment only if the Soviet Union dismantles its medium-range nuclear missiles aimed at Western Europe.

In the address marking the 20th anniversary of the French-German friendship treaty that culminated the two countries' postwar reconciliation, Mitterrand sternly warned against any attempts to break Western Europe's defense alliance with the United States.

During his day-long visit, Mitterrand emphasized that French nuclear arms "could not be taken into account" in negotiations in Geneva on medium-range missiles. The talks are focusing on the "excessive armament of the superpowers, which had to be radically reduced," he said.

"If one of the two great powers destroyed all of its medium-range missiles, it would still retain thousands of nuclear rockets," he told the parliament, or Bundestag. "But France would lose a decisive element of its deterrent capacity and thus the guarantee of its security."

Soviet leader Yuri Andropov offered Dec. 21 to reduce Moscow's medium-range nuclear force in European Russia from about 600 missiles at present to the 162-missile level of the combined nuclear forces of France and Britain.

Paris, London and Washington all have rejected the Soviet position. They maintain that the French and British missiles are independent strategic forces and that the Soviet proposal would leave the United States without a medium-range deterrent in Europe.

The Social Democrats' national executive board met today before a party congress in Dortmund and said that while the party shared Mitterrand's view that the number of French missiles could not be negotiated in Geneva, the existence of the French force should be considered in determining the relative strengths of the superpowers.

"The existence of a French atomic force cannot be overlooked and will therefore have to play a role in the goal of achieving a military balance in Europe," the statement said.

French diplomats admitted that the Mitterrand government is troubled by the West German Social Democrats' attitude and finds much greater compatibility on defense issues with Kohl's party.

While other European political leaders have grown uncomfortable with what they view as Washington's rigid negotiating stance, Kohl and Mitterrand remain committed to President Reagan's "zero option." Mitterrand warned about the dangers of a divided alliance and said that any diminution of defense ties with the United States would place Europe in grave peril.

"The joint determination of the alliance and its solidarity must be confirmed so that the negotiations can succeed," Mitterrand declared.

He announced that French military spending plans for the next five years would concentrate on bolstering the nuclear deterrent.

The French president also proclaimed his intention to improve strategic and defense cooperation with West Germany, a dimension long neglected in the postwar relationship.

Mitterrand also said that France and West Germany must intensify joint research in high technology to close the gap with Japan and the United States and provide better employment prospects for young people.

"Europe has no future if its youth has no hope," he said.

Unless greater cooperation in advanced industrial fields was achieved, he charged, Europe could quickly become dominated in the microelectronics age by U.S. and Japanese subsidiaries.

Mitterrand's exhortations were a veiled call for West Germany to support efforts by the nationalized French firm of Thompson-Brandt to take over Grundig, a major German electronics company.

On Friday, Kohl travels to Paris to address the French parliament.

In the closing moments of his speech, Mitterrand leaned forward from the podium and, in a voice hushed with emotion, described the Germans as "a great, noble and courageous people" whom he had come to know and love despite the suffering he endured before managing to escape from a Nazi war camp.