MOSCOW, SEPT. 8 -- When President Bush shakes hands with Soviet President Mikhail Gorbachev in Helsinki on Sunday, he will be meeting the leader of a diminished superpower that is scaling down its international commitments yet struggling to find a new role in the Middle East.

The crisis in the Persian Gulf has highlighted the reversal of three decades of Soviet activism in the Third World and the surrender by the Kremlin of long-cherished superpower ambitions. As former secretary of state Dean Acheson once said about postwar Britain, the Soviet Union today is in the midst of losing an empire and searching for a new role in the world.

Exhausted by foreign adventures and preoccupied by domestic troubles, the Soviet Union has begun to look inward.

At the same time, however, Moscow still has important interests in the Middle East that it wants to defend. Calls by Soviet Foreign Minister Eduard Shevardnadze for an international peace conference that would tackle the Arab-Israeli dispute in addition to the gulf crisis appear to be an attempt to ensure a continuing Soviet role in a strategically sensitive part of the world.

"There is still an element of rivalry between the superpowers -- but it now takes the form of peaceful competition rather than confrontation," said an Arab diplomat in Moscow. "The Soviets do not want to be squeezed out of the Middle East entirely, so they have to find ways of distinguishing their position from the U.S. position."

It is widely accepted here that, had the gulf crisis erupted just a few years ago, the Soviet Union would have felt duty-bound to defend its client, Iraq, against the rival superpower. Soviet propagandists might even have interpreted the Iraqi invasion of Kuwait as another victory for socialism against imperialism, as symbolized by the "corrupt" gulf sheiks and their American "masters."

But the Kremlin has taken a very different course. By supporting United Nations sanctions against Iraq, Moscow has sided with the "imperialist" West against its erstwhile "progressive" ally. In many parts of the Arab world, once a key area of ideological and military struggle between East and West, the Soviet Union is now perceived as the junior partner of the United States.

For most ordinary Soviets, global influence is scant consolation for degrading living conditions, empty stores and a devastated environment. Seen from Moscow, there seems a direct correlation between the unprecedented superpower cooperation on a major regional crisis and the unraveling Soviet economy.

"We don't need geopolitical influence in the Middle East. We need sausage, coffee and bread in the shops," said Alexander Bovin, a commentator for the government newspaper Izvestia and a leading proponent of "new thinking" in Soviet foreign policy. "We want to be a superpower of a different kind, exercising a moral influence rather than directly countering every American move around the globe."

Other Soviet and foreign analysts, while conceding that ideological considerations are now of little importance to Soviet policy-makers, disagree with Bovin about the extent to which the Kremlin is ready to sacrifice its traditional political ties in the Arab world to smooth relations with the West.

"This is still a vital region for the Soviet Union -- financially, geographically and strategically," said Vitaly Naumkin, deputy director of the Oriental Institute in Moscow. "It's important for our security. The rise of Islamic fundamentalism on the Arabian peninsula could have a direct impact on our southern Moslem republics. That's why we have to be very careful about the way we respond to this crisis."

The invasion of Afghanistan in December 1979 represented the apogee of Moscow's quest for worldwide geopolitical influence. It was the first time that the Kremlin had sent its own combat troops to fight in a Third World country. With hindsight, however, the invasion also marked the start of the Soviet Union's worldwide decline.

"Paradoxically, the decline of the Soviet Union began when we tried to project our military power overseas," said Andrei Kortunov, an analyst with Moscow's U.S.A. and Canada Institute. "The former Soviet leadership regarded foreign intervention as compensation for domestic stagnation. But Afghanistan was a no-win game -- strategically, militarily and ideologically. The Afghan people were clearly not ready for socialism."

Forays into developing countries, such as Afghanistan and Nicaragua, and the expansion of Soviet naval power in the 1970s enabled Kremlin ideologists to argue that history was moving in the direction of socialism. But the world's first communist state paid a heavy political and economic price for its geopolitical overextension.

"There is now a consensus here against any further military adventures abroad. Just as you had a Vietnam syndrome in the United States, so are we now experiencing an Afghanistan syndrome. Gorbachev cannot afford to send troops abroad. The Soviet people would be completely against it. Perhaps we could send two or three ships to the gulf as a symbolic contribution to a multinational force. But that's all," said Naumkin, the Middle East specialist.

Soviet attempts to gain a foothold in the Middle East started after the death of dictator Joseph Stalin in 1953. During the late 1950s and '60s, Moscow began supplying arms and political advice to radical Arab states, forging the basis for an anti-American coalition in the region. The Soviet Union and the United States found themselves on opposite sides in most of the major conflicts in the region, from the Arab-Israeli War of 1967 to the Israeli invasion of Lebanon in 1982.

Soviet involvement in Iraq was typical of the Kremlin's view of the Third World as an area of permanent East-West conflict. It began in 1958, after the overthrow of the pro-Western Iraqi monarchy by Arab nationalists, and deepened after the Baath Party took power in 1968, with Saddam Hussein emerging as unchallenged leader by 1979. The Soviet Union encouraged Iraq's anti-Western, nationalist forces, especially exploiting Saddam's ambitions in the Arab world and need for arms to form a tactical political alliance.

The Soviet investment in Iraq made the invasion of Kuwait an important test of the sincerity of Gorbachev's policy of "new thinking" and his opposition to the use of military force in international affairs. Soviet leaders have described the decision to cut arms supplies to Iraq following the invasion as very difficult. In the end, however, the logic of Gorbachev's perestroika, or restructuring, seems to have given them little choice.

"To have continued with our arms supplies to Iraq would have meant the failure of the ideology of new thinking. Gorbachev would have lost all his gains with Western public opinion. The only real question is how far the Soviet Union should go in supporting the U.S. position," said Kortunov.

The past few days have witnessed several attempts by the Kremlin to make clear that there are differences between Moscow and Washington. Unlike the Americans, the Soviets have maintained a high-level political dialogue with the Iraqis. While rejecting any direct linkage between Iraq's occupation of Kuwait and other Middle East issues, they have hinted that Israeli concessions could create a favorable atmosphere for negotiation. And the Soviets are committed to a peaceful settlement of the gulf crisis.

Both superpowers have a common interest in securing a complete Iraqi withdrawal from Kuwait. Beyond that, however, their interests do not necessarily coincide. A U.S. military victory over Iraq would emphasize America's geopolitical dominance in the region. The establishment of a pro-Western government in Baghdad also would completely cancel out three decades of Soviet investment in the present Iraqi government.

"In Helsinki, Bush will want to persuade Gorbachev to continue taking a firm line against Saddam Hussein. But Gorbachev will want to convince Bush of the need for a peaceful solution to the crisis," said an Arab diplomat here.

As the Kremlin confronts the first international crisis of the post-Cold War era, some analysts here are already grappling with the challenge of defining a post-imperial Russian foreign policy. They reason that if the Soviet Union breaks up into its component parts, Russia, the largest Soviet republic, will remain a huge land power with its own interests and vast border to defend.

"Gorbachev's policy of 'new thinking' was essentially an attempt to replace the collapse of Soviet political influence in the world with moral influence. It helped liberate us from old ideological stereotypes. It was ideological, idealistic and a little naive. But it is hardly the basis for an operational diplomatic strategy for a country like Russia. The new diplomacy should be smart, professional and realistic," said Kortunov, who represents a new breed of pragmatic Russian political scientist.

Kortunov suggests that post-imperial Russia should develop a Gaullist-type foreign policy based on vigorous defense of national interests. He advocates a new strategic doctrine, abandoning Moscow's previous insistence on "no first use" of nuclear weapons. If it manages to free itself of its imperial burden, Russia will be able to sharply reduce the size of its standing army. To ensure a cheap, effective defense, it will have to rely on nuclear deterrence.

Such views may seem somewhat theoretical at present. Gorbachev is still battling for the Soviet Union's survival as a vast multinational confederation, albeit in a radically different form from the previous totalitarian state. In fact, however, the gulf crisis provides a vivid illustration of the retreat from empire. Frustrated in its attempts to become a global power, the Soviet Union is looking for ways to ensure its status as a continental power dominating the Eurasian land mass.

Much of the debate that has taken place within the Soviet foreign policy establishment over the past month has centered on the problem of the nation's proper role in world affairs. Senior military leaders argue that the Soviet Union must somehow counter the U.S. military buildup in the Middle East to preserve its status as a superpower. The reaction among reformers has been scornful.

"Generals always try to fight the last war," said Bovin, the Izvestia commentator. "If you were a Soviet general, you would probably also be concerned at seeing American troops so close to our borders. But such considerations have become irrelevant when we have the ability to obliterate New York with one of our missiles. As long as we have 20,000 nuclear warheads, we will still be a great power."

When the commander in chief of the Soviet-led Warsaw Pact military alliance said the U.S. buildup in the gulf could jeopardize talks on reducing conventional weapons in Europe, he was swiftly rebuked by the Soviet Foreign Ministry. Spokesman Gennadi Gerasimov said he could see "no connection" between the military balance in Europe and U.S. actions in the gulf.

"The Soviet Union under perestroika is a different place," said Kuwait's ambassador to Moscow, Abdulmohsin Duaij, summing up the remarkable developments of the past month. "They are no longer looking at these regional conflicts through the eyes of a superpower. Gorbachev has no wish to be seen to be friendly with brutal regimes like Iraq."