In the midst of a remarkable political comeback at home, President Francois Mitterrand travels to New York on Wednesday for a meeting with Ronald Reagan that the French leader hopes will dispel the bitterness of the French-American dispute over the bombing of Libya.

In conversation at the Elysee Palace, Mitterrand makes clear that he is prepared to use the occasion to put the differences over the U.S. attack on Libya behind the two allied nations if Reagan is.

"There are no traces of bitterness against the United States in France," says Mitterrand, who refused to allow U.S. fighter-bombers based in England to overfly France on their run to Libya in April. "We may see things from a different angle, but we are together when it comes to essential questions," particularly on East-West matters.

Throughout an hour-long conversation earlier this month, the French president portrayed his personal relations with Reagan as "quite good" and French-American relations as too important to be upset by occasional differences such as the Libyan matter.

He nonetheless took pains to explain at some length his reasons for refusing to associate France with the attack on Tripoli, and attributed much of the misunderstanding to what he called American emotional reaction to France's determination to defend its own interests.

"We are even more against terrorism than are the Americans. There is more terrorism in France and in Europe than there is in America," Mitterrand declared with agitation.

"But to be against terrorism does not mean you are simply an agent for the FBI. On this, we have different ideas. I don't believe that you stop terrorism by killing 150 Libyans who have done nothing. You don't solve these problems by collective reprisals. I don't believe in collective reprisals."

His view, he said, "is not an act of defiance against the United States. This is a philosophy that I have. The refusal of the overflight was not a matter of being weak against terrorism. They are two different questions."

The circumstances that make Mitterrand both the villain of recent American public opinion, as he ruefully acknowledged, and the only foreign leader invited to take part in the July 4 celebrations of the Statue of Liberty centennial in New York were set in motion 100 years ago when France gave the statue to the United States.

But for a number of immediate reasons beyond fence-mending, the Socialist leader's trip to New York is highly opportune for him, and for Reagan.

Three days after he sees Reagan for an hour-long private meeting on July 4, Mitterrand departs Paris for Moscow, where he will hold extended talks with Soviet leader Mikhail Gorbachev at a moment when Soviet-American contacts over a future summit meeting appear to be in a crucial phase.

As part of his detailed discussion of arms control and strategic issues, Mitterrand said that the progress of U.S.-Soviet talks on nuclear weapons in Geneva will help determine whether France goes ahead with its own nuclear weapons modernization program, including plans to build and deploy Europe's first neutron bomb.

"We will arm ourselves if they continue to overarm themselves," he said of the superpowers.

Mitterrand also is not willing to permit France to be formally associated with the Reagan administration's Strategic Defense Initiative, despite recent declarations of support for the space weapons program from the new French prime minister, Jacques Chirac. Unprecedented Power Sharing

The trip to New York comes as Mitterrand and Chirac are finishing the first 100 days of cohabitation, the French term for the unprecedented power-sharing arrangement between the Socialist president and Chirac, the leader of the conservative parties that won control of Parliament away from the Socialists in March.

Elected to a seven-year term in 1981, Mitterrand has essentially yielded the stage on domestic matters to Chirac and his conservative Cabinet, which is charged by the constitution to propose and execute government policy. But Mitterrand asserts that the constitution gives him the dominant role in foreign affairs and defense, and he will use the New York and Moscow visits to buttress that claim.

Reagan will be able to assess at first hand Mitterrand's transformation in the 100 days of cohabitation, in which power has passed to Chirac and popularity has passed to Mitterrand.

Labeled a lame-duck president with no firm hold on power in the early days after the legislative defeat, Mitterrand has watched quietly as his self-styled role as "referee" of French national interests has steadily boosted his standing in public opinion polls, first matching and now, at 55 percent, surpassing the approval ratings he registered just after the 1981 election.

Chirac has just as steadily dropped in public esteem as he has moved unsteadily to fulfill his electoral promises to apply to the highly centralized French economy the kind of free market economic liberalism that he praises Reagan for applying to the United States.

This reversal of standing has led many French political analysts to conclude that, far from being a lame duck, Mitterrand might now seek and win reelection in a battle with Chirac if he pledges to shorten his second term to five instead of seven years, as he has hinted.

The president, who is 69, has the advantage of being able to provoke a new election at any time between now and the scheduled date of May 1988 by resigning.

To a visitor who has met with Mitterrand in each of the six summers since he was elected to the Elysee, the French leader gives the impression of deliberately avoiding drawing up a plan for a specific time to call new elections. Instead, he appears to be content to let Chirac try to implement free-market programs that Mitterrand thinks suit neither the French temperament nor the French economy, and to seize on an opportune moment to call an early presidential election if it presents itself. Preserving France's Independence

Mitterrand also gives the impression of having concluded that the next election will not be decided simply on left-versus-right ideological grounds. Instead, it will probably be won by the candidate who is perceived by voters to be more traditionally "French" in outlook. He clearly thinks he can win such a contest against Chirac.

Whether speaking of his disagreement with the United States over Libya, his continuing rejection of Gorbachev's demands for direct talks with France on arms reductions, or his view that French technocrats actually prefer central control of the economy and only pay lip service to economic liberalism, Mitterrand tends to explain his decisions in terms of French independence and the necessity to preserve it at all costs.

He displays a sensitivity on this point that could come only from the leader of a nation invaded three times in the past 110 years by its former enemy-neighbor, Germany.

"If the United States were to consider that it could have good relations only with countries that said yes to everything the United States wanted, this would no longer be a relationship of alliance and friendship, but of domination," Mitterrand said when asked about the problems between Washington and Paris on Libya.

"America knows that we are allies who are ready to take risks, as part of the alliance that we have signed. We have shown this," said Mitterrand in the discussion, which occurred June 20 in his office overlooking the verdant Elysee Palace gardens.

He responded stiffly, and reluctantly, when first asked about the overflight dispute. He repeatedly made the point that he was not attacking the United States, but responding to questions. He left an impression that he shared American exasperation with the volatile Libyan leader, Col. Moammar Gadhafi.

But Mitterrand confirmed that in mid-March -- one month before the request for overflight rights -- France had turned down a request from Washington to have the French Navy join American warships in sailing into the Gulf of Sidra to test Gadhafi's territorial claim to that entire body of water.

"This refusal should have made our American friends think that for the same reasons, France would be reticent about a future overflight request," Mitterrand observed, adding that France is a Mediterranean country with close ties to the Arab world that it had to take into consideration.

Pointing out that Chirac and the conservative parties had generally and quickly agreed with the refusal of overflight rights, Mitterrand called the joint decision the easiest agreement of the three months of "cohabitation."

Speaking of the intense American reaction, which included tourist boycotts and widespread denunciation of France, Mitterrand said:

"America is very sentimental, which in fact is a nice quality. I like the sentimental, caring and open welcome that people in America extend. But at the same time, they have the inconveniences of sentimental people. If they feel that someone has let them down, sometimes they jump to the wrong conclusion.

"It isn't ill intentioned," but it can contribute to sharp, temporary misunderstandings between two essentially friendly nations, he said. Arms and East-West Issues

On strategic matters, where he has offered crucial support to the Reagan administration's nuclear rearmament program, Mitterrand made the following points:

He is concerned that the renunciation of SALT II treaty limits by Reagan could contribute to undermining the Anti-Ballistic Missile Treaty of 1972, a development that he said he feared the most.

But Mitterrand refused to focus blame for problems in Soviet-American arms negotations only on Reagan, saying that both superpowers were responsible for what he called "a contest to outbid each other" in acquiring new atomic weapons.

He expects Gorbachev to press him in Moscow for French-Soviet talks on intermediate-range missiles. Gorbachev for his part should expect a continuing rejection by Mitterrand of any such talks, Mitterrand said, since France will not give up its plan to boost its current force of about 150 nuclear warheads to about 600 by 1992 unless there has been massive Soviet-American disarmament.

He suggested that France will begin to produce a neutron bomb if the Soviet-American arms negotiations break down. France reportedly has successfully tested the enhanced-radiation weapon, which provoked protest in other European countries when the Carter administration developed it in the United States.

"If we are heading toward a time of disarmament, France will not be the country that would complicate the situation by announcing a new arm. But if the two superpowers are not successful in this area, then France will do what she can.

"If the two superpowers don't work toward limitation of atomic weapons, we find ourselves with a moral and psychological freedom to defend ourselves according to our means. And the neutron bomb is a part of the panoply of arms that we can have. I would be more inclined to say yes to the neutron bomb than I am today" if the Soviet-U.S. talks do not succeed, Mitterrand said.

Despite an intensifying pace of exchanges, Soviet-U.S. arms talks "don't seem to get into gear," Mitterrand observed. "It is like a clock that is stopped that they can't get started again." As a result, the overall chances for successful talks are not as positive this year as they were last.

But he was not totally pessimistic about the possibility of progress being made on what has been the most contentious issue at the Geneva talks: the Soviet demand that the United States give up all planning for the SDI space weapons system.

"I think Mr. Gorbachev wants to negotiate. But because of Mr. Reagan's resolution, he cannot hope to block all arms negotiations simply by making agreement on SDI a precondition" for progress on other points, Mitterrand said. He has an "intuition," he said, that the Russians will come up with proposals for negotiating an interim agreement to demarcate limits on research and deployment to avoid an impasse.Mitterrand said that he would not agree to allow France to participate formally in SDI, despite recent statements by Chirac to the press and parliament that France should associate itself with the American program.

"I have not accepted that France as a state will associate itself with SDI," Mitterrand said. "France should not participate in anything in which France does not have a say in the decisions." His remarks indicated that he would refuse to approve a change in policy permitting France to have the kind of formal nation-to-nation agreements reached by Britain and West Germany with the United States.

But Mitterrand would not characterize the apparent disagreement with Chirac as serious, saying that his administration had, even before the March elections, allowed French firms to decide for themselves whether they would seek contracts in SDI research without any formal agreement between France and the United States and would continue to do so.

He clung tenaciously to the French political tradition of not discussing domestic politics for publication abroad. He would not confirm reports originating with close associates that he felt Chirac had broken a private agreement with him by calling attention to the differences on the American space defense program.

Instead, Mitterrand said there had been no serious differences between him and the prime minister on foreign policy, even though one could have expected different points of view on South Africa, Central America and development in the Third World. Greater Monetary Cooperation

Mitterrand also voiced cautious optimism toward the effect of the recent Tokyo summit conference of industrialized nations on foreign exchange stability.

"There is progress, but it is too timid. The monetary cooperation between the yen, the dollar and European currencies has to be enlarged for this movement to be a success. It was very interesting in any event to note in Tokyo that American free-enterprise advocates had to admit that the laws of the marketplace were not sufficient."

His remarks carried a heavy suggestion that he believes Chirac will eventually have to admit that Reagan-style free enterprise does not suit France. Mitterrand clearly believes that four centuries of intensive state involvement in the economy have conditioned the French to prefer dirigisme, the concept of strong central control, to Chirac's brand of economic liberalism.

Mitterrand seemed to take the view that the conflict between economic liberalism and dirigisme is likely to handicap Chirac by forcing him to take halfway measures that will please no one.