U.S. presidential envoy Philip C. Habib arrived here today to begin a new mission in the Middle East aimed initially at getting stalled negotiations between Lebanon and Israel over the withdrawal of all foreign troops from this country under way after weeks of wrangling over procedures.

He was expected to meet with President Amin Gemayel, Prime Minister Shafiq Wazzan and other top Lebanese officials Saturday before flying on to Israel Sunday or Monday.

Elsewhere in Lebanon, an Israeli soldier was killed in the latest of several attacks on occupation troops. A car carrying several unidentified gunmen opened fire on an Israeli jeep in the port city of Sidon, 25 miles south of Beirut, killing one soldier and wounding three others.

Habib, who was last here Sept. 23 for Gemayel's presidential inauguration, faces the thorny task of reconciling two fundamentally different approaches that have so far kept the two sides from holding any formal meeting.

Right now, the prospects for completing the negotiations by the end of the year, as the Reagan administration has suggested could be done, do not look good, and some diplomats here are already speculating they will drag on to February or March.

Habib also will have to deal with a new set of preoccupations by the Lebanese government stemming from the worsening sectarian strife between Christian and Moslem Druze in the mountains southeast of the capital.

The government wants to give top priority to getting the Israeli forces out of the Chouf Mountains, through which the strategic Beirut-to-Damascus highway runs, and replacing them with Lebanese Army units backed by an enlarged Western multinational peace-keeping force.

Gemayel has said he wants the 4,000-man force expanded to 30,000 troops and to use it first along the Damascus highway and in the Chouf to fill the vacuum left by the departure of Israeli troops there. He has asked Britain, the Netherlands, Belgium, South Korea and Austria to join the force, which is now made up of U.S., French and Italian soldiers.

Israel has shown no willingness to accept such an interim solution, under which it would give up control of the highway and abandon the Chouf before an overall settlement on the withdrawal of all foreign troops is reached.

The Lebanese Army is deployed only in and around Beirut, with the rest of the country occupied by approximately 40,000 Syrian, 10,000 Palestinian and 15,000 Israeli troops.

For almost a month, U.S. Deputy Assistant Secretary of State Morris Draper has been shuttling to Beirut, Jerusalem and Damascus trying to arrange a mutually acceptable framework for the talks.

The basic idea is for the three countries to hold two sets of bilateral talks, the first involving Lebanon and Israel and the second Lebanon and Syria. It is not clear whether Syria will negotiate on behalf of the Palestine Liberation Organization or there will be separate Palestinian-Lebanese negotiations.

Israel has been insisting on political as well as military talks to discuss not only the withdrawal of its troops but the normalization of relations with Lebanon, which has never formally recognized the Jewish state.

Lebanon, on the other hand, wants to restrict the talks to the purely technical issues involved in the withdrawal of all foreign troops, which would probably be carried out on a simultaneous basis, although Syria has been demanding that the Israeli troops leave first.

Israel has named the director general of the Foreign Ministry, David Kimche, to lead its delegation, thus emphasizing the political nature of the talks. Lebanon, however, has put Brig. Gen. Abbas Hamdane, who heads the already existing Lebanese-Israeli military liaison committee in charge of its negotiating team.

The Israelis want Lebanon not only to name a diplomat whose rank is comparable Kimche's but also to agree to holding the talks alternately in Beirut and Jerusalem. This would further enhance their political nature since Lebanon would be implicitly recognizing Jerusalem as the Israeli capital -- which all Arab states, including Egypt, have refused to do.

So far, Draper has not succeeded in sorting out these various issues to clear the way for the opening of talks. The Lebanese press today termed his mission "a semifailure" and hailed the return of Habib to the region to deal with the stalled negotiations.