The Republic of China is slowly becoming a non-nation.

Of the world's 150-odds nations - and some are very odd, indeed - only 23 recognize Nationalist China (more than 100 did a few years ago). And of those, only 12 - including the Vatican - maintain embassies here.

Perhaps more important, only two nations that matter much, the United States and Saudi Arabia, have ambassadors here (the remainder, with the exceptions of South Korea, are small African or Latin American states). And Leonard Unger, the U.S. ambassador, has about him the preoccupied air of a man attending his own wake.

Two of the four American libraries are being closed, and there are fewer than 1,000 U.S. military personnel here, down from 9,000 in 1971. "Normalization" on Peking's terms - which means withdrawal of all U.S. military personnel from Taiwan, closure of the American embassy here and abrogation of the 1954 Sino-American mutual-security treaty - now seems inevitable and, in view of Zbigniew Brzezinski's recent visit to Peking, perhaps sooner rather than later.

Relations between American and Chinese Nationalist officials here remain correct and self-consiously friendly. But those relations are marred by a palpable sense of sadness, a hint of a trust about to be betrayed, a feeling of the approaching end of a partnership.

Yet the American presence here, even after the embassy closes, will remain profound. More than 200 major U.S. corporations have more than $500 million invested here, and 2,000 American businessmen and their dependents, an equal number of misionaries and 1,500 other Americans are resident in this tight little island the size of Holland.

Perhaps the surprising thing is that the atmosphere here is no more depressing than it is, that Nationalist China's isolation is not so complete as it seems.

The Chinese are masters of making the best of a bad situation and, while only one out of eight nations recognizes the existence of Taiwan, Nationalist China has what Board of Trade Director General H. K. Shao describes as "significant relations" with "more than 140 nations."

"Significant relations" - which are defined as embracing consular, trade, commercial and cutural contacts - are conducted through a number of ingenious subterfuges.

Japan, for instance, which transferred its embassy to Peking in 1972, has about a dozen diplomats (including a former ambassador to Manila) attached to a non-profit organization called the Interchange Association. The association issues visas and performs other functions normally done by an embassy. Indeed, since it "broke" relations with Taiwan has increased significantly to $3.8 biilion, and the trickle of Japanese tourists has become a flood.

American officials here do their best to assure the Nationalists that a fomula for "normalization" can be found that will not be prejudicial to the security of this island's 17 million people, that something similar to "the Japanese solution" can be worked out.

But the Nationalists are not buying that, for the simple reason that the United States is not Japan. They maintain the blow of withdrawal of American recognition would be profound, that it inevitably would lead to a flight of capital and people from Taiwan, encourage Red China to step up infiltration and cause a crisis of confidence in East Asia.

The Nationalists maintain - and American officials here seem to believe them - they will never play "the Soviet card" seek an informal defensive understanding with Moscow to replace the 1954 security treaty with Washington. Yet should it become a question of survival, no one can say what Taipei might be driven to do.

The alternative for Taipei is to seek more sophisticated weapons with which to defend itself, and to mount a global propaganda offensive designed to delay for as long as possible the moment when the United States withdraws recognition. And that in fact is what the Nationalists are doing.

Meanwhile, it's business as usual for a little country that has made itself the world's 22nd largest trading nation and the 12th largest trading partner of the United States. Five of 10 major development projects - including a mammoth shipyward, a large steel mill and a nuclear power plant - have been completed. A trade mission will leave here next week to purchase $731 million in American goods.

For a nation that in the eyes of most of the world does not exist, Nationalist China is likely to be alive and kicking for some time to come.