The French government, grappling with its second consecutive crisis overseas, met in unusual emergency session today and adopted new measures to ensure order on the remote French Pacific island of New Caledonia, where violence has escalated and militant separatists have declared an independent state.

On the heels of the political uproar in France over Libya's failure to abide by its agreement to withdraw its troops from the former French colony of Chad, the Socialist government of President Francois Mitterrand has come under fresh attack from the right-wing opposition for not doing enough to maintain law and order in the distant Pacific territory.

In a statement issued after the Cabinet session today, Prime Minister Laurent Fabius named a special representative to govern the island directly for the next two months while negotiations proceed for hastening the territory's self-determination. The Cabinet session followed new clashes between native Kanak militants and residents of European heritage in which at least two persons are known to have died.

The sudden upsurge in violence on the island last month following elections boycotted by the separatists, led by the Kanak Socialist National Liberation Front, has come as an embarrassment to Mitterrand's Socialist Party, which traditionally has favored decolonization.

Situated 12,000 miles away from France, on the other side of the globe, New Caledonia is midway between Australia and Tahiti. It has been a French colony since 1853, and its population is made up of 60,000 Kanaks, as the original inhabitants are called; 50,000 whites, many of whom are descendants of deported French convicts, and 30,000 other immigrants, mostly Asians.

The new government representative named by Fabius today is Edgar Pisani, 66, a former minister of agriculture under president Charles de Gaulle and more recently the commissioner responsible for the European Community's relations with developing countries. He will have the title of high commissioner and will be responsible for the restoration of public order and negotiations with the separatists.

Today's 20-minute Cabinet session, chaired by Mitterrand at the presidential Elysee Palace, was the first such extraordinary meeting of ministers since the Socialist government came to power in May 1981. Political analysts here said it appeared designed to lend a note of drama to the government's actions.

In New Caledonia, Kanak militants officially installed their own independent government in a ceremony in a suburb of the capital, Noumea. They raised a green, red and blue flag, which they said would be the emblem of the new nation of "Kanaky."

Jean-Marie Tjibaou, president of the self-styled provisional government of Kanaky, explained to reporters that "green symbolized the Kanak countryside, red the struggle of its people and their unity, blue for the sea and the sky." A yellow sun in the center of the flag was designed to evoke the "natural elements" on the island, which has the world's largest reserves of nickel.

"Kanaky is being born," Tjibaou said during the ceremony. He evoked the deaths of "comrades who have fallen and those who will fall" and said such deaths were the "duties of the struggle," news services reported.

The island's legal president, Dick Ukeiwe, who is also a neo-Gaullist senator, arrived in Paris for consultations with Mitterrand. In a television interview, he called on the government to take firm action against the separatists and not to be swayed by "ideology."

Ukeiwe was elected president Nov. 23 in balloting boycotted by the Kanak Socialist National Liberation Front, the main separatist party. The elections were intended as a first step to gradual self-determination for the territory by 1989 but sparked a wave of separatist violence.

Kanak nationalists kidnaped a government official, set up roadblocks throughout the island and burned down houses belonging to whites. The official, Jean-Claude Demar, was released Thursday, but violent clashes between the island's two main communities have continued for the past two days.

Police said one resident of European origin and one Kanak were wounded today in a skirmish at a roadblock in Poya on the west coast of the main island, and the body of a white was pulled from the Thio River in the east, news services reported. It was unclear whether the death was related to the political violence.

Yesterday, a white municipal official and a Kanak separatist were killed.

In Noumea, most stores, bars and restaurants were closed and the streets nearly deserted today after Mayor Roger Laroque declared the capital a "dead town" as a mark of outrage at the violence.

Reports reaching Noumea said that sporadic violence continued around the island today and that families fearing for their safety have begun to flee outlying towns and villages for the capital.