The Rev. Miguel d'Escoto, Nicaragua's foreign minister who has been fasting for 26 days to protest Reagan administration policies toward Nicaragua, is to end his fast on the recommendation of his doctor.

D'Escoto, 52, started his fast July 7, saying he wanted to bring attention to "the terrorist policies of the U.S. government against Nicaragua," in particular, the deaths of about 3,000 Nicaraguans killed since the United States began funding antigovernment rebels in late 1981, special correspondent John Lantigua reported.

D'Escoto has been fasting on the grounds of a Catholic church in a poor Managua neighorhood and, according to his doctors, has consumed no solid food since it began. The official newspaper of the governing Sandinista front, Barricada, reported yesterday that the foreign minister, who weighed 205 pounds when the fast began, had lost 30 pounds.

Tonight, Dr. Kevin Cahill, an American who is monitoring d'Escoto's health, said he had advised the foreign minister to suspend the fast. Cahill said that d'Escoto had suffered no permanent damage but that he risked cardiac problems if he continued.

Aides to d'Escoto said he had received messages of support from at least 29 countries during the fast. Among those who fasted in solidarity with d'Escoto were the Rev. Philip Cousins, president of the National Council of Churches, and Rabbi Irwin Blank, president of the Synagogue Council of America, aides to d'Escoto said.

D'Escoto is a Maryknoll priest who was suspended from performing priestly functions earlier this year for refusing to abide by new Roman Catholic Church canon law that prohibits clergy from holding government office.