Austrian Chancellor Fred Sinowatz resigned today in an apparent attempt to revitalize the ruling Socialist Party following its defeat in presidential elections yesterday by former U.N. secretary general Kurt Waldheim.

An emergency session of the Socialist Party leadership decided to nominate Franz Vranitzky, the 49-year-old finance minister, as the new chancellor. He will be sworn in next Monday along with a new Socialist-led coalition government.

The change of government came as Jewish organizations around the world made clear that they would continue their campaign to investigate allegations that Waldheim was involved in Nazi atrocities in World War II.

Most Western European governments sent polite messages of congratulation to the newly elected president, but Israel announced that it was temporarily withdrawing its ambassador to Vienna in protest.

In Washington, White House officials said President Reagan has sent a "routine congratulatory letter" to Waldheim through diplomatic channels. A copy was not made public, but one official said, "It is not an effusive letter."

[White House spokesman Larry Speakes said that Waldheim, as Austrian chief of state, would be exempt from a 1978 U.S. law allowing the United States to exclude aliens who were associated with the Nazi government, The Associated Press reported.]

Simon Wiesenthal, who has devoted his life to documenting Nazi war crimes, said in a telephone interview, "There are two losers in this election. One is the international image of Austria. The other is Austrian Jews."

Political commentators here, meanwhile, depicted the result as a personal triumph for the former U.N. chief and a sign that the voters want to put an end to 16 years of Socialist rule. It marked the first time since World War II that a candidate supported by the opposition People's Party has won the presidency, a mostly ceremonial post.

Political analysts said that Sinowatz's decision to step down from the chancellorship -- he remains as party leader -- was designed to help the Socialists regain political support before parliamentary elections scheduled for next April. A series of scandals has sapped the popularity of the government and is believed to have been at least partly responsible for Waldheim's surprisingly easy defeat of his Socialist rival, Kurt Steyrer, by 53.9 percent to 46.1.

The timing of the change of government was regarded as significant because it means that the new ministers will be sworn in by the outgoing Socialist president, Rudolf Kirchschlaeger. Waldheim does not take office until July 8.

As debate continued in other western countries over the new president's war record, Austrian politicians and political commentators said they hoped that the divisive electoral campaign would be quickly forgotten. The mood of many ordinary Austrians was captured by the slogan "Back to the Future," which appeared on pro-Waldheim billboards overnight.

The contrasting reactions at home and abroad indicated the gulf in public opinion that seems to separate this prosperous Central European country of 7 million people from many other western nations.

"The world does not understand Austria -- and Austrians don't understand the world," commented Peter Lingens in the weekly magazine Profil, which revealed last March that Waldheim had failed to disclose important details about his wartime service in the Balkans.

Unlike Germans, who were forced to confront their Nazi past, most Austrians have a kind of collective amnesia about the period 1938-45 when their country was incorporated into the German Reich.

Wiesenthal said today that the emotions unleashed by the election campaign might have made it even more difficult for Austria to confront the darker side of its history.

Many Austrians had seen the election as a vote for or against the World Jewish Congress, Waldheim's principal accuser, rather than for or against Waldheim, he explained.

Wiesenthal said that threats against his Holocaust documentation center here had increased from around two a week before the campaign to four or five daily.

Political analysts here said that Austria's role as a trusted East-West intermediary, and importance as a transit center for East European Jews immigrating to Israel, would make it difficult to organize a diplomatic boycott of the new president. The official Soviet news agency Tass last night accused the U.S. administration and "Zionist circles" of organizing a "hostile campaign" against Waldheim.

The Austrian president-elect received strong Soviet backing and lukewarm U.S. support when he sought the post of U.N. secretary general.

Jewish organizations opposed to Waldheim have maintained that the fact that he was at one time wanted for war crimes by Yugoslavia could have made him a potential target of Soviet blackmail. A former Yugoslav military representative in Vienna, Anton Kolendic, said last week that he had provided his Soviet counterparts with details of Waldheim's war record in early 1948.

Waldheim, 67, has consistently denied allegations of wrongdoing during the war or knowledge of war crimes. The Yugoslav charges were later dropped, and no conclusive evidence has emerged to show that he personally took part in the deportation of Jews or reprisals against civilians, as has been alleged.

Hailing Waldheim's election as a triumph of Austrian democracy, the mass circulation Neue Kronen Zeitung today urged Austrians to "forget the unpleasant campaign as quickly as possible." It added in an editorial that Austria should never again allow foreigners to meddle in the country's internal affairs.