France's ruling Socialist Party attempted today to heal a damaging public controversy over its political identity and electoral strategy that has pitted two of its leading figures against each other.

Prime Minister Laurent Fabius and party chairman Lionel Jospin are quarreling about how to fight a crucial parliamentary election campaign next March. But the larger issue is the political legacy of President Francois Mitterrand, France's first left-wing head of state in more than 25 years.

The dispute broke out three weeks ago at a campaign rally, where Fabius called on the Socialists to occupy the center ground of French politics. The prime minister's nonideological approach, along with a perceived attempt to take personal charge of the electoral campaign, angered Socialist stalwarts wanting their party to preserve its traditional left-wing identity.

In a countermove, Jospin called for a meeting of the Socialist Party's directorate this weekend. He also published an open letter urging Socialist leaders not to allow the party to submerge its identity in a centrist electoral coalition and threatened to resign if they sided with Fabius.

Emerging from today's party meeting, Jospin said, "The problems are behind us." He suggested that he and Fabius hold a joint political rally to demonstrate that the prime minister and the Socialist Party would share responsibility for running the electoral campaign.

For some French political analysts, the controversy has reflected two sides of Mitterrand's complex personality. Both men were handpicked for their present jobs by the 69-year-old president and both represent a younger generation of Socialist politicians.

Mitterrand, the dominant figure in French left-wing politics for the past 15 years, has developed an electoral strategy of trying to woo Communist voters by stressing socialist ideals and promoting the so-called "Union of the Left." This part of his political mantle has now been picked up by Jospin, 48.

As president, however, Mitterrand is also preoccupied with the concrete problem of how to complete his seven-year term, which expires in 1988. If the Socialists do badly in next year's legislative elections, Mitterrand is likely to need some measure of centrist support to deal with a politically hostile National Assembly.

Fabius, who at the age of 37 became France's youngest prime minister last July, has inherited the opportunistic strand in Mitterrand's personality. Abandoning his earlier left-wing rhetoric, Fabius now scarcely bothers to mention the word "socialism" in his speeches and emphasizes instead political pragmatism and the need to modernize France's smokestack industries.

"To modernize and to unite," declared the banner at the prime minister's campaign meeting June 14 in the southern city of Marseilles. His speech was crammed with references to "equality of opportunity," "freedom" and "liberalism" -- all themes that could easily be used by a moderate right-wing politician.

In his open letter, Jospin criticized the prime minister's idea of building a centrist "Republican Front" around the Socialist Party.

"Of course it is necessary to unite," he wrote, "but you have to unite your own people before you can win over the others."

While Jospin has broad support from within the party, his standing in the public opinion polls is much lower than Fabius'. The prime minister, by contrast, is stronger in the country than he is in the party.

The political situation was captured neatly in a cartoon in the Paris newspaper Le Monde at the height of the TWA hostage crisis. It depicted Jospin as the pilot of the Socialist Party airplane complaining that Fabius was attempting to stage a hijacking.

Today's compromise solution was foreshadowed by a personal intervention in the dispute by Mitterrand last week. The president issued a Solomon-like judgment in which he declared that both his proteges were right.

With an eye on his political future, Mitterrand said Fabius was right to want to "unite" Frenchmen of all political persuasions. And with a gesture to his traditional left-wing power base, he added that Jospin was right to be "firm in his convictions."

Some Socialist politicians would like to go much further than Jospin in asserting the party's left-wing identity. The fundamentalist faction includes former prime minister Pierre Mauroy, who today called for the Socialists to return to the opposition if they lose the 1986 elections.

At the same time that the Socialists are wondering how to handle defeat, their right-wing opponents are wondering how best to exploit a victory.

Former president Valery Giscard d'Estaing and the leader of the neo-Gaullist party, Jacques Chirac, have both called for some form of coexistence with Mitterrand, but former prime minister Raymond Barre is adamantly opposed to any kind of political deal.