Last year my health took a turn for the worse, and suddenly I couldn’t work. At night I’d count bills instead of sheep. Listening to the peaceful breathing of my sleeping lover (who believes money will eventually fall from the sky), I’d obsess over the day when we couldn’t pay the mortgage, when the heat, water, electricity and telephone were all shut off. Once asleep, I’d wake up panicked at 5 am. How could we live in a refrigerator box with six cats and a dog?

Fortunately, friends did a fundraiser for me, which kept a roof over my head and food on the table. But feelings about money are quixotic: Although destitute and desperate, I felt queasy depending on the kindness of strangers, my embarrassment commingling with gratitude. And even with that help, the medical bills remain staggering, as does my concern over money. I’d rob a bank -- but it’s hard to make a discreet getaway in a wheelchair.

This current bout isn’t even my first brush with that charming Dickensian duo, bad health and financial ruin. In the nightmare week of my life, in 1984, I got diagnosed with cancer and lost my job as managing editor of a publishing house. I was 26. Convinced I would die soon, I spent money like crazy -- maxed out my credit cards, partied round the clock, seized the moment. I was determined to go out with a bang, not a whimper. Fortunately, my disease went into remission; unfortunately, my credit rating was terminal. It took over 10 years to mend the damage I’d done in one.

Many PWAs find themselves in similar straits, spooked by all those unopened bills. While new drugs offer a reprieve from an imminent death sentence, the benefits of a longer life have raised the question: Can you afford to survive? In the past, lucky PWAs found reprieves from money woes in viatical settlements, but those are increasingly difficult to come by. You must prove you’ll be dead soon -- and have an insurance policy in the first place.

Beyond lotteries, sweepstakes or fundraisers, however, I’ve learned there are keys to maintaining financial and emotional balance in the midst of serious illness. Most vital to your well-being is stanching the money panic by making yourself feel “safe” financially -- or at least not desperate. I sought the advice of Sarah Williams, a financial-analyst friend in San Francisco whose annual income exceeds what I’ve earned in the last decade.

Williams advises her clients with HIV to be proactive about money. “Plan for illness as if it were your imminent ’retirement,’” she says. “Put your money into high-yield, low-risk funds -- CDs, mutual funds, moneymarket accounts. Forget IRAs. Don’t overspend. And cut up your credit cards!”

Too late for people like me, sick with fragile finances. For us she suggests: “Talk to your creditors immediately. Don’t wait. If you have a mortgage, that’s the most important thing to consider because it’s your biggest investment, financially and emotionally. Real estate is still soft -- mortgage companies don’t want your house, they want money. If you have a good payment record, most companies are flexible.”

Health insurance is essential. Since my first illness, I’ve kept my medical insurance current -- one short hospitalization can cost as much as the down payment on a house. Most plans charge only a nominal fee for lifesaving, but incredibly expensive, drugs.

Utilities are the amenities that distinguish your home from that refrigerator box. You can live without gas and hot water in the warm months. But when the temperature falls below 50 degrees at night, condensation will turn to snow flurries in your living room, and you’ll be wearing more layers than the Michelin tire man. Most utilities offer discount payment plans. Phone services will keep your line on as long as you have a physician’s letter stating it’s medically necessary.

If you’re overloaded with credit-card debt, consider filing for bankruptcy. “You can protect certain assets -- your house, some cash -- and it will lift the weight of all the other bills,” Williams says. “But remember, you can only do it once every 10 years.”

Money worries can do worse than keep you up at night. The stress can make you sicker and doesn’t exactly enhance your self-esteem. Taking control of your financial situation, I’ve learned, is good for your health. Bite the bullet and start opening those bills. But buy a lottery ticket anyway -- just in case.