The health of Soviet dissident Anatoly Scharansky is deteriorating rapidly, according to a letter said to have been sent out of the Soviet Union's Chistobol prison by a fellow inmate.

Scharansky's health problems have long been known, but the latest message - received in Israel Friday and relayed to his wife, Avital, in New York - indicates that the 31-year-old prisoner's condition is worsening, that he is losing weight rapidly, and that he is not getting medical attention.

Scharansky "suffers from strong headaches," the message said, according to the translation provided by his wife. "He has constant shivering fever, and he is losing weight drastically. There is definitely some dangerous process taking place, maybe in the brain," according to the translated message.

The identity of the Chistobol inmate who wrote the letter is being protected for fear of Soviet reprisal, Mrs. Scharansky said. Political prisoners are not allowed to discuss health matters in their allotted monthly letters out of the prison, and Mrs. Scharansky said the news of her husband's health was written in code.

A Scharansky letter to his mother, received in May 10, indicated that he was losing his sight and suffering the same kind of severe headaches described in the more recent message. "When I read or write, my eyes and then my head begin to hurt," Scharansky wrote then.

The latest news of Scharansky's health was received as his wife was en route to Washington to attend the annual policy conference on Soviet Jewry, a three-day gathering that began yesterday. On Thursday, President Carter leaves for Vienna and a summit conference with Soviet President Leonid I. Brezhnev, highlighted by their signing of the new strategic arms limitation treaty (SALT II).

Scharansky, a computer technician, became a cause celebre in the West when he was first refused an emigration visa and then arrested for treason in March 1977, accused of working for the CIA. President Carter personally intervened on Scharansky's behalf.

Scharansky was convicted in July 1978 and sentenced to 13 years in the Chistobol prison at Tataria, east of Moscow. The timing of the trial, conducted while Secretary of State Cyrus R. Vance was meeting in Geneva with Soviet Foreign Minister Andrei Gromyko to discuss SALT II, was interpreted then as a rebuke to Carter's human rights policies.

Mrs. Scharansky, in Washington yesterday, said she had no plans to meet with Carter to ask him to intervene again on her husband's behalf when he meets with Brezhnev. She said she was somewhat encouraged, however, by what western analysts interpret as a Kremlin move to better relations with the United States, as evidenced in the release of five Soviet dissidents in a prisoner exchange last month.

The national conference on Soviet Jewry was scheduled for this week before the Carter-Brezhnev summit was planned. Mrs. Scharansky, who has been in this country for about three weeks, has traveled widely in the west since her husband's arrest to seek support on his behalf.