America's special Middle East envoy, Alfred Atherton, left Egypt last night after talks with President Anwar Sadat and Foreign Minister Mohammed Kamel that predictably failed to resolve the impasse in Israeli-Egyptian peace negotiations.

He left behind an Egypt that appears increasingly dubious about the possibility of peace and troubled by a string of foreign policy setbacks that have eroded its position in the Arab world and in Africa.

Atherton said he found Sadat "as dedicated as ever" to the quest for a negotiated peace agreement. He told reporters that "the fact that I am here and that I am coming back is evidence that the process is going on and it is not in any sense stalled."

But well-placed Egyptian officials view those remarks as a palliative for public consumption. The Egyptians ever expected that Atherton, shuttling back and forth between Cairo and Jerusalem, would find formulas on the Palestinian issue and the Israeli settlements in the occupied territories that would put the peace negotiations back on the track.

Kamel, replying to yesterday's proposal by Israeli Prime Minister Menachem Begin that Egypt and Israel resume their direct negotiations, said a decision on that would be made after Begin's talks with President Carter in Washington later this month.

"Begin won't give anything to us or to Atherton or even to [Secretary of State Cyrus] Vance," an Egyptian official said. "He'll give it to Carter and extract a price for it."

More than three months have elapsed since Sadat went to Jerusalem. The handshakes and embraces on television have given way to a war of words and a stalemate that appears little different from the situation that existed before Sadat's dramatic trip. A note of doubt and confusion has crept into the conversations of Egyptian officials who were confident and upbeat six weeks ago.

From discussions with government officials and other Egyptians, newspaper commentary and the public statements of Egyptian leaders, a picture emerges of a country that sees itself on the defensive, uncertain about some of its policies, and hurt that it is not getting the support it thought it deserved.

External events, some related to the peace negotiations and some not, have gone badly for Egypt, contributing to the malaise.

"Our policies don't waver, but it seems that some of our moves may not be understood," one high-ranking official said.

The commando raid on Larnaca airport in Cyprus, in which 15 Egyptian soldiers were killed in a vain attempt to capture two men who slew a prominent Egyptian writer, is being widely criticized as a blunder and an adventure that should not have been undertaken.

The raid led to a break between Egypt and Cyprus and a split between Egypt and the Palestine Liberation Organization. The latter step in turn is seen as likely to chill relations with Arab countries like Kuwait that have maintained ties with Egypt since the peace initiative but are said to be increasingly troubled by its failure to produce any results.

Foreign Ministry officials are beginning to worry that the Arab rejectionist states, whose opposition to the peace initiative was originally dismissed here as hysterical posturing, are looking better.

The Egyptians are watching with concern the response to the Arab League's invitations to the semi-annual meeting of the league council, to be held here March 27.

Egyptians do not expect the rejectionist states -- Syria, Algeria, South Yemen, Iraq and Libya -- to send more than token representation, since they are committed to boycotting Arab League activities in Cairo. But if countries like Kuwait or Tunisia, for example, also send low-level delegations, the Egyptians will regard that as an indirect criticism from states that have so far refrained from outright opposition.

Syria is seen here as moving closer to the Soviet Union, and therefore beyond the hope of an reconcillation with Egypt.

The Egyptians are also uncomfortable with events in Africa. Sadat, by all accounts, genuinely believes that the Soviet Union and its supporters in Libya and Ethiopia are trying to subvert him, and African developments are watched with great interest here.

The Council of Ministers of the Organization of African Unity delivered a blow Tuesday by unanimously reaffirming its support for "front-line" Arab states in the struggle with Israel and for the PLO as the rightful representative of the Palestinian people.

Not only did the OAU rebuff Egypt, but it did so at a meeting in Libya, a country Egypt regards as its archenemy. The Libyan leader, col. Muammar Qaddafi, welcomed a surprise visitor in Tripoli -- President Mohammed Siad Barre of Somalia, to whom the Egyptians have been giving political and military support in his conflict with the pro-Soviet regime in Ethiopia.

Authoritative Egyptian sources said there has been dissent within the government over Sadat's decision to drop Egypt's traditional role as a mediator in the horn of Africa and go openly to Somalia's support.

A rapprochement between Siad Barre and Qaddafi would prompt an Egyptian reappraisal of this policy, they said.But Egypt's position would be difficult because Saudi Arabia has called upon all the Arab countries to support Somala in its conflict with Ethiopia, and Egypt can ill afford to alienate the Saudis by going back on that policy now.

Egypt intervenes in African affairs only "To protect our national security," one high official argued. That policy, he said, is well established and will continue. But the strains in relations with all its current adversaries could be resolved if peace with Israel were achieved, he said.

There appears to be less optimism about the prospects for that with each passing day. "The word that came back from Washington when Sadat went there was patience," An official said. "But what is beyond the patience?"