For more than two weeks, the Soviet Union has watched with gratitude and amazement as rescue teams and relief supplies have flowed into Armenia from around the world. And in the process, the way the Soviet Union thinks about itself and the outside world has changed significantly on a number of fundamental political and social issues.

"For the first time, perhaps, in our history, we were not afraid to admit we needed help - really huge amounts of help - because we could not cope alone," Yegor Yakovlev, editor of the influential weekly paper Moscow News, said Thursday as he announced plans for an internationally financed hospital to replace facilities destroyed in the quake."Before, we always pretended that socialism was so perfect, and certainly so superior to capitalism, that we needed no assistance from abroad," he said. "This is a basic change in the way we see ourselves and the way that we see the world. We at last recognize that realism must prevail, that human lives count more than false pride."

Offers of assistance were accepted quickly - a decision by the Soviet Communist Party's ruling Politburo that undoubtedly saved thousands of lives and continues to have a major psychological impact.

"They didn't have time to think this through three or four times at the top, and so they did what came naturally, thank God," one Soviet historian in Moscow said this week. "I hope that what has happened will now reinforce all the other trends for reform."

As television viewers watched rescue teams from nearly 30 nations arrive in Armenia, the opening of the Soviet Union to the outside world became wider than ever.

Never had there been such a massive relief operation in the Soviet Union. Never had so many nations come to Moscow's aid - even during World War II or after the 1966 earthquake that heavily damaged the city of Tashkent in Soviet Central Asia.

"The sorrow of our country has brought a response from all mankind," Premier Nikolai I. Ryzhkov, who has headed the relief effort, said as he returned to Moscow this week. "The world has shared our grief, and it has come to our assistance in a way for which we are deeply grateful and which we will always remember."

Indeed, the scope of the tragedy - a death toll officially estimated at 55,000 but perhaps as high as 100,000 - would be dramatic enough to draw world sympathy almost anywhere.

The Armenian quake gave the Soviet people an opportunity to be seen as very human, very vulnerable - and the decades-old image in the West of a militarized society determined to dominate the world seemed to crumble.

"When we learned there would be special charity concerts and soccer matches for us, when we saw how much money was raised in the United States in television appeals, when we saw one plane after another arriving with medicines and clothes and other supplies, we knew that we were not alone," Eduard Aikazyan, the Armenian government representative in Moscow, said in an interview. "Grief shared is grief diminished. Hope shared is hope increased. ..."

In the outpouring of aid, the Soviet Union also found that its new foreign policies under President Mikhail S. Gorbachev had paid off in assistance when needed, breaking centuries-old barriers.

"The assistance was the direct result of glasnost," chief Foreign Ministry spokesman Gennady I. Gerasimov said this week, referring to Gorbachev's policy of openness. "We opened up, told the truth. ... There was a wave of sympathy that I don't think you would have seen five years ago - definitely not."