President Tito's doctors today issued their bleakest bulletin yet on the health of the 87-year-old Yugoslav leader, indicating that both his heart and lungs are in a final stage of deterioration.

The former World War II guerrilla leader has been in a hospital in the northwestern Yugoslav city of Ljubljana since Jan. 11 when he was said to be suffering from arteriosclerosis. Complications developed three weeks after the amputation of his left leg Jan. 20.

Last weekend doctors revealed that Tito was suffering from pneumonia, of inflammation of the lungs, in addition to heart and kidney problems.

In their latest bulletin, doctors said: "The general state of health of President Tito remains grave. Despite intensive therapy, the pneumonia is not abating. Disturbances in the heart rhythm are appearing more and more frequently and signs of heart weakness are persisting."

Independent medical sources said it now appeared to be a question of which would give way first -- Tito's heart or his lungs.He is already reported to be on an articial kidney machine.

Ordinary Yugoslavs interpreted the bulletin as meaning that, after a seven-week illness, Tito cannot now have long to live. The lengthy illness has helped prepare this Balkan country of 22 million people for their first change of ruler in 35 years -- and there is now less evident concern for the future than a month ago.

The collective leadership designated by Tito to succeed him appears to have functioned smoothly, at least in the short term. Yugoslav officials have made it clear that they will stick to Tito's policy of strict nonalignment in world affairs.

Yugoslav Foreign Minister Josip Vrhovic has just ended a tour of India and Bangladesh designed to canvass support for a move within the nonaligned movement to condemn the Soviet invasion of Afghanistan. Diplomatic sources said Belgrade would like to use the present crisis to isolate Cuba and other pro-soviet countries within the nonaligned movement.

Meanwhile a message from President Carter for Tito was handed over to the Yugoslav Foreign Ministry today by U.S. Ambassador Lawrence Eagleburger. U.S. sources said it expressed wishes for Tito's recovery and American views on the Soviet invasion of Aghanistan.

Tito's last publicized act was to authorize messages to be sent in his name to Carter and Soviet President Leonid Brezhnev calling for efforts to halt a breakdown in detente. The messages were signed by Vice President Lazar Kolishevski who will take over as nominal head of state in the event of Tito's death.