UPDATE 5-Nerves fray, frustration grows in Shanghai's lockdown purgatory

(Adds Shanghai resident, details on home quarantine prospects)

By Brenda Goh and Martin Quin Pollard

SHANGHAI, April 22 (Reuters) - Stiffening resolve after three weeks of strict lockdown, authorities warned Shanghai's 25 million frazzled residents on Friday that their purgatory would go on until the COVID-19 virus was eradicated neighbourhood by neighbourhood.

"I have no idea whether I will ever be allowed to go out again in my lifetime, I'm falling into depression," one user commented on China's Twitter-like Weibo beneath a report by state news agency Xinhua on the latest measures announced in Shanghai late on Thursday.

Another user asked: "How much longer is this going to last?"

Offering a glimmer of light, the city government said on its official WeChat account that infections were showing a "positive trend" and that life could return to normal soon as long as people stuck to strict rules to curb the spread of the virus.

Yet some Shanghai districts tightened restrictions on movement, and even in neighbourhoods that met criteria for people to be allowed to leave their homes officials were ordering them to stay put, fraying nerves in households that have endured weeks of isolation.

"Our goal is to achieve community zero-COVID as soon as possible," the government said, referring to a target to stamp out transmission outside quarantined areas.

"This is an important sign of winning this major, hard battle against the epidemic...so that we can restore normal production and order to life as soon as possible."

When infections began to surge at the start of April, almost everyone in Shanghai was ordered to stay at home. As a result, residents have lost income, suffered family separations and have had difficulty meeting basic needs.

Health officials raised hopes this week for some return to normal by saying transmission had been curbed, only for city officials to tighten restrictions a day later, causing widespread confusion and indignation.

Late on Thursday, Shanghai announced a new round of "nine major" actions, including daily city-wide testing from Friday, restricting movement and accelerating transfers to quarantine centres.

Home quarantine could be a temporary solution if homes met certain conditions, authorities said, without elaborating. In such cases, door sensors would be installed to monitor compliance.

Dutch resident Jaap Grolleman, 32, has been stuck in a tiny flat with his partner since April 1 and recent positive cases among neighbours mean he faces at least another two weeks of isolation.