India has embarked on a major diplomatic campaign to improve ties with its South Asian neighbors as relations worsen with Pakistan, the largest and most powerful of them. At the same time, it is about to begin talks with China, another neighbor, in an effort to solve a border dispute that erupted into war almost 20 years ago.

High Indian officials have gone to Bangladesh and Nepal, while a Sri Lankan Cabinet minister held talks here and President N. Sanjiva Reddy is planning to visit that island republic early next year. Even Bhutan has not been left out; the Foreign Ministry official dealing with that vest-pocket kingdom is scheduled to pay a call there soon.

This round of neighborly calls was prompted by the realization among some in Prime Minister Indira Gandhi's government that increasingly strained relations with Pakistan require New Delhi to mend its fences with the other nations of South Asia if it is to remain the dominant regional power.

During the past two years, India has found itself taking opposite positions from its neighbors in the United Nations and the nonaligned movement on issues such as the Soviet invasion of Afghanistan and the recognition of the Vietnamese-installed government in Cambodia.

In an important gesture toward the newly elected leadership in neighboring Bangladesh, Eric Gonsalves, one of the top civil servants in the Ministry of External Affairs, reported substantial progress in talks last week on leasing Dacca a strip of Indian territory leading to two Bangladesh enclaves.

This positive development came after months of often bitter wrangling over the division of waters from the Ganges River and the ownership of a tiny, newly formed island in the Bay of Bengal that both nations claim. India occupied the island during the summer and then removed its forces reportedly to lessen the impact of anti-Indian feeling during the recent Bangladesh election campaign.

Simlarly, Foreign Minister P. V. Narasimha Rao's visit to Nepal late last month was also viewed here as a success, although differences remain between India and the Himalayan kingdom.

India, for example, reported that Nepal had agreed to talks between the two nations alone on harnessing water resources that flow from Nepal's mountains to India. Katmandu, however, quickly said it has not abandoned its desire to include Bangladesh in these talks to make a truly regional water compact -- an approach favored by such international agencies as the World Bank.

Katmandu also wanted New Delhi to join in declaring Nepal -- a landlocked country that shares borders with India and China -- as a zone of peace that could remain isolated from either superpower and regional rivalries. India has been cool to the idea, proposed by Harvard-educated King Birendra, because it already has a friendship treaty with Nepal. Pakistan, Bangladesh and China have endorsed it.

Rao made it clear in Katmandu that any effort to weaken India would be "counterproductive" for other nations in the region -- an apparent reference to the U.S. sale of arms to Pakistan, which New Delhi views as a threat.

"None of the countries of the region stand to gain anything by India being weakened or embarrassed in any way," Rao said.

India has developed into the dominant force in the region -- the country that is most powerful militarily and has the strongest industrial base -- and resists any effort by its neighbors or outside powers such as the United States that it feels could undercut it.

This view was reflected in a statement by Gandhi during her election campaign complaining how low India's position in the region had dropped while she was out of office.

"Even little Bhutan is making eyes at us," she said in a reference harking back to the Hindu view that lessers should not dare even to cast a glance upward at a better.

As a result of the new American relationship with Pakistan, which the Reagan administration sees as the eastern anchor of a strategic grouping to protect the Persian Gulf, it appears that New Delhi is trying to reach an accommodation with its neighbors to preserve its position.

Indian officials privately agree they are not as worried about the infusion of new American arms in Pakistan, which has drawn strong Indian opposition, as they are of the political implications of the new links, which could allow Islamabad to pose a threat to India's primacy on the subcontinent.

It is unclear whether this view led to the long-stalled Indo-Chinese talks starting Thursday in Peking, although China and Pakistan are firm friends and some Indians have expressed the fear that this country will be squeezed by what is sometimes referred to as the "Washington-Islamabad-Peking axis."

The border talks with China over a disputed 14,500 square miles of Himalayan mountain territory are seen here as the beginning of a normalization process between the world's two most populous nations, which were best of friends until the 1962 war.

Peking apparently would like to improve relations with India, in part to counter the Soviet influence in this country, which gets the bulk of its military supplies at highly advantageous terms from Moscow, Western sources here said.