YEREVAN, Armenia— Two and a half years after its independence, this tiny Caucasus nation should be enjoying the excitement of new-found freedom. Instead, it is experiencing little but pain.

The capital has electricity two hours a day, shop after shop is closed, and lines form early for bread and kerosene, rationed and doled by international relief agencies.

Little wonder people are fleeing. By unofficial accounts, more than half a million people have abandoned Armenia in the last three years, reducing the population to three million in an area slightly larger than New Jersey.

Although the countryside is still reeling from a catastrophic earthquake in 1988, Armenia's enduring burden is a man-made plague of the post-cold-war era: deadly ethnic warfare and the resulting social, political and economic isolation.

The battlefield is a tiny mountainous area, Nagorno-Karabakh, populated by ethnic Armenians but part of Azerbaijan for 70 years. Since the collapse of the Soviet empire, Nagorno-Karabakh has been waging a war to secede, but this year has been the deadliest. And it has expanded in the last three months, as the Armenian Government, long a not-so-secret patron of the Karabakh cause, has itself sent men to fight at the front. Suffering From Blockade

But economic warfare can be equally deadly, and one of Azerbaijan's weapons in the war has been a blockade of Armenia. "It is strangling us," a man in a mountain village said, voicing a lament echoed throughout the country.

This landlocked nation has long been dependent on imports, for more than two-thirds of its food and all of its oil and natural gas. Most of it passed through Azerbaijan. Armenia's neighbor to the west is Turkey. But Turkey backs the Azerbaijanis, and has sealed its border with Armenia. Turkey will not allow even relief aid across its land to Armenia.

Wheat and oil could reach Armenia through Georgia, Armenia's northern neighbor. But Georgia is being sundered by its own ethnic wars. Trains operate infrequently in Georgia for lack of fuel or because the tracks have been blown up, often by Azerbaijani guerrillas.

Armenia is so desperate that it hopes to reactivate a nuclear power plant that was shut after the earthquake in 1988. The United States contended that the Soviet-built plant was unsafe, but Russia agreed in March to provide nuclear fuel and technicians so that the plant could be reopened.

"At this point, Armenia has no option, just no option," said Steve Tashjian, Armenia's Deputy Prime Minister for Energy. "It is unfair to tell the people of Armenia, we will not turn the lights on for you with nuclear power." New Clinic Is Unused

In the village of Shirakamut, which is midway on the rail line between Yerevan and Tbilisi, the Georgian capital, there is a sparkling medical clinic. It has a modern forced-air heating system and fluorescent light bulbs. But the clinic is cold and empty -- no heat, no light. And it has no medicines, not even bandages.

The clinic, at the base of mountains on the north side of the village, was built by Liechtenstein after the earthquake, which killed more than 300 of the 3,000 villagers and at least 25,000 people in northern Armenia.

"I lost my mother and father, and a brother, and my daughter," 25-year-old Nora Torasian said, standing in the kitchen of her home -- a metal container 10 feet wide and 30 feet long where she lives with her husband and two children.

More than half of the 700 families in Shirakamut live in such containers, which were brought in as temporary shelter after the earthquake. There is no running water, no electricity, no heat.

Throughout Armenia, industry operates at 30 percent of capacity. Almost no one in Shirakamut, which was called Nalband before independence, has a job. A textile factory, which specialized in men's handkerchiefs, was destroyed in the earthquake -- 60 women were killed -- but rebuilt. Today, the sheds comprising the factory are unused, for lack of raw materials and power.

One of the fortunate in Skirakamut is Mrs. Torasian's husband. He is one of two men working at the train station, which employed 100 a few years ago. But his salary, 170 drams a month, which is 40 drams more than a schoolteacher earns, buys little. A loaf of bread costs 25 drams, a kilogram (2.2 pounds) of butter 600 drams, and a flat of 30 eggs, the customary way they are sold, 500 drams.

Like just about everyone in Armenia, the Torasian family lives hand to mouth, scrounging a few things here, selling them there.

"We took two sacks of potatoes to the market, but the money we got was not enough to buy three kilos of sugar," Mrs. Torasian said. "I work hard to grow the potatoes, and I don't want to sell them."

The family eats potatoes for breakfast and dinner.

"I forgot what meat is," Mrs. Torasian's 72-year old mother-in-law said. "But I know what potatoes are, and they know me."

As the Torasian family talked, a parakeet chirped from a cage in the corner of the rusting container, which leaks when it rains. The bird was one of two that had belonged to Mrs. Torasian's sister-in-law, who lives in Yerevan. The other one froze to death this winter. But as soon as the weather warms, the family will release this one. They cannot afford to keep it. It eats food the family needs.