Prime Minister Menachem Begin was reported in good condition and "excellent spirits" today after suffering a mild heart attack yesterday, and his doctor said he will be able to resume work shortly from his hospital bed.

Begin's personal physician, heart specialist Dr. Mervyn Gottesman, said today that the prime minister may have to stay in the hospital for two or three weeks. However, he will be permitted to resume work gradually, and the latest myocardial infarction should not prevent him from returning to his normal work schedule, Gottesman said.

Although Begin is still attached to a series of monitoring devices in the intensive care unit of the cardiology department in Jerusalem's Hadassah Hospital, he held a series of talks on state matters during the day and scanned official reports.

One of the first reports Begin was given today concerned yesterday's U.N. vote in which Israel was censured by trying to tighten its hold on Arab East Jerusalem, captured from Jordan in the 1967 Middle East war. The report, according to aides, "infuriated the prime minister" who rejected the resolution outright.

This rejection was later included in a statement issued by Israel's Foreign Ministry. The statement also said, "The resolution is part of a long list of condemnations of Israel by the U.N. and is the result of the antagonistic attitude of the organization to Israel, which ignores the present reality and Israeli rights."

The Foreign Ministry statement added that the Jerusalem resolution will "impede the peace efforts which Israel is determined to pursue."

This apparently referred to the resumption of talks on Palestinian autonomy scheduled for Wednesday in Washington after an interruption of almost two months.

Although the Begin government narrowly escaped a parliamentary defeat yesterday when the Knesset, Israel's parliament, voted 60 to 54 against a motion that would have led to its dissolution, the defeat in the United Nations was not expected to add to Begin's troubles at home.

The subject of Jerusalem is one of the few on which there is a virtual consensus in Israel. The annexation of the Old City and former Jordanian East Jerusalem to a portion of the city already in Israeli hands was proclaimed in June 1967 by the ruling Labor Party government. Extensive housing projects have been built since then, and several government offices had already been moved to East Jerusalem before the Begin government came to power in May 1977.

This does not mean that all Israelis agree that all the present government's actions on Jerusalem have been justified. Two moves were especially criticized: the proposed law combining the old and new sections of Jerusalem into one city, and the rumored move of the prime minister's office to a new office building now under construction in the eastern part of the city.

Among Begin's visitors today were the military chief of staff, Lt. Gen. Rafael Eitan, and deputy prime ministers Yigael Yadin and Simcha Ehrlich.

They all reported that they found the prime minister, who was placed in the intensive care unit with six other patients, in "excellent spirits."

"From the way he talked and reacted, I would not have believed that there was anything wrong with him," Yadin told reporters when he emerged from the prime minister's ward.

Eitan reportedly briefed Begin on Israel's raid against Palestinian guerrilla positions in Lebanon early yesterday morning. He also repeated his request that the prime minister, who has been acting as minister of defense since the resignation of Ezer Weizman a month ago, oppose suggested additional cuts in the defense budget.

A Cabinet meeting that was supposed to resolve the drawn-out debate on the cuts was postponed today because of Begin's illness.

In another development, more than 50 influential American Jewish leaders publicly denounced Begin's political "extremism" today and said Israel must make more concessions in the occupied West Bank in return for peace, United Press International reported.

The statement, which reflected a growing schism between American and Israeli Jews over the peace process, was the group's first public denouncement of Begin, who one of the signers of the statement described as "a disaster."