The three-year drought that halved food production and crippled national economies in this region appears to be lifting for Zimbabwe and some of its southern African neighbors.

Two months of steady, drenching rainfall have doused parched farmlands and filled to capacity two-thirds of Zimbabwe's reservoirs, setting the stage for what agricultural officials cautiously predict may be one of the country's best crop years ever.

"Another dry season would have been a terrible disaster," said John Laurie, president of the Commercial Farmers' Union. "We need six more weeks of good weather but so far the season has been excellent, and the recovery in some sectors has been almost miraculous."

"We are expecting a bumper crop throughout the whole country," said Silas Hungwe, vice president of the National Farmers' Association of Zimbabwe, which claims 200,000 peasant farmers as members.

According to the U.N. Food and Agriculture Organization (FAO), rain has also fallen in sufficient quantities in Malawi, Swaziland, Angola, Zambia and parts of Mozambique. Nonetheless, because harvests are not due for several months, the latter three countries and Zimbabwe remain on the FAO's list of 28 African nations most seriously affected by drought.

In Washington, meteorologist Douglas Le Comte of the National Oceanographic and Atmospheric Association confirmed that there had been heavy rain in those countries, adding: "You could almost say the . . . drought is over in southern Africa."

Although there have also been scattered rains in central Africa, analysts say the forecast for the rest of the continent, including Ethiopia, is still in doubt. A senior U.N. official, Bradford Morse, director of the Office for Emergency Operations, said earlier this month that 34 million Africans remain critically affected by drought and famine.

South Africa has not been as lucky as some of its black-ruled neighbors, although good rains since Jan. 15 have prevented a repetition of last year's economic disaster, when the country was forced to import nearly 3 million tons of corn. Analysts this year are predicting a corn shortfall of between 500,000 and 1 million tons.

That opens up the intriguing prospect that the white-minority government, which has long boasted of being Africa's breadbasket, may purchase corn this year from some of its black neighbors. In the past, South Africa has purchased most of its grain imports from the United States, but the strength of the U.S. dollar may make Zimbabwean grain more attractive, officials here said.

Neighboring Botswana and Lesotho also are still suffering from rain shortages. Botswana's cattle industry has benefited from late rains but the country is expected to produce only about 10,000 tons of grain, slightly better than last year but far short of the 190,000 tons the country consumes annually. Botswana, with its large diamond and ranching industries, is one of the few countries prosperous enough to afford large-scale food imports.

There are no official crop estimates available from Lesotho but a recent survey by American diplomats reported that 50 percent of the corn fields they observed had signs of permanent wilting or scorched leaves. They projected a possible loss of half the country's usual crop.

Farming is the most important economic activity in this region. Economists have estimated that the drought cost Angola, Botswana, Lesotho, Mozambique, Zambia and Zimbabwe at least $2 billion. The FAO has estimated that the drought forced the six countries to import at least 2 million tons of grain last year alone.

The coming of the rains is expected to have a ripple effect throughout the economy. It also has impact on the political and social climate, and has contributed to a mood of optimism here among peasants and the predominantly white business community that could aid Prime Minister Robert Mugabe's bid for a larger majority in this year's national elections.

"There's no question the drought had cast an enormous shadow over everyone," said Laurie. "But now there's a greater feeling of confidence, a feeling that we're finally over the hump."

Zimbabwe's producers of corn, the main staple for this country and much of Africa, are hoping for a harvest of as much as 1.8 million tons. Coupled with a 300,000-ton surplus currently in storage, they say the corn would be enough to feed the population of 8 million, replenish reserves and still have at least 400,000 tons for export.

The rainfall also means a dramatic increase in wheat, which is grown during the colder dry season beginning in April and requires irrigation. The government cut off all irrigated water to vast tracts of wheat fields last year, reducing the crop to 96,000 tons. This year, farmers hope to more than double that amount to 220,000 tons, enough to feed the entire country.

In Mozambique, ample rain has saved crops in the northern provinces of Sofala, Zambezia, Nampula and Tete. But the southern provinces of Gaza and Inhambane remain arid and the country's ability to move food from surplus regions is hampered by attacks from armed rebels. Last year, 100,000 Mozambicans died of starvation, most of them in the north.

"The crop due for harvest in April 1985 is likely to be well below normal, at least in southern parts," said a special report by the FAO's Early Warning System. "The current critical food supply situation cannot be expected to improve in the near future and emergency and relief assistance will continue to be required on a large scale throughout 1985."

In some cases, the rain has been too abundant. At least 12 persons died earlier this month in floods in South Africa's Natal Province, and the Mozambican capital of Maputo has been cut off from the north by rising flood waters. Similarly, farmers here are worried that the continuing rain is washing nutrients from the soil and may affect the corn crop. Traditional dry-weather crops such as cotton and tobacco are likely to decline slightly in volume this season.

Nonetheless, Zimbabweans have welcomed the rain. Serenaded by a drum and bugle corps, hundreds gathered earlier this month at Lake McIlwaine to celebrate a sight they had not seen in four years -- the spilling over of the artificial lake.