Image: Underwater home © Greg Vote, Fuse, Getty Images

Losing your house may soon carry with it an added blow: a big tax bill from the Internal Revenue Service.

Anytime a lender writes off, or "forgives," debt, it can be considered taxable income to the borrower. The bigger the debt, the bigger the potential tax bill: Every $10,000 in forgiven debt could incur $1,500 to $3,500 in federal taxes, depending on your tax bracket.

If your home is $100,000 "underwater," that could mean a federal tax bill of up to $35,000. State and local income taxes could increase the pain.

In recent years, most underwater homeowners who lost property to foreclosure or short sales were excused from having to pay taxes on this income, thanks to the Mortgage Debt Relief Act of 2007.

This law says homeowners don't have to include forgiven debt as income as long as:

  • The debt was secured by a principal residence. Mortgages on investment property or vacation homes don't qualify.
  • The debt was "used to buy, build or substantially improve your principal residence, or to refinance debt incurred for those purposes," according to the IRS.
  • The maximum amount that can be treated as "qualified principal residence indebtedness" is $2 million, or $1 million if married and filing separately.

Liz Weston

Liz Weston

The act's protections are scheduled to expire at the end of the year, however, and it's not clear when or even if Congress will get around to renewing them.

"Obama did include it in his budget, to extend it to 2014," said Mark Luscombe, a principal analyst for tax research firm CCH, a Wolters Kluwer business. "Congress . . . might decide it's not as crucial as extending the tax breaks that already expired at the end of last year."

That doesn't mean Congress won't eventually act to extend the relief, Luscombe said. "Usually the only fight about these things," he said, "is finding a way to pay for it."

But accurately forecasting what Congress will and won't do, especially in regard to taxes, is tough. Most tax experts, for example, believed lawmakers would reinstate the estate tax rather than let it temporarily vanish in 2010. But Congress failed to act, and some billion-dollar estates went untaxed.

The scheduled expiration of the mortgage debt relief law means a whole lot of uncertainty for a whole lot of underwater homeowners who are in the process of foreclosure or trying to arrange short sales.

More than 2 million properties are currently in foreclosure, according to tallies maintained by Lender Processing Services. An additional 4 million mortgage holders are at least 30 days behind.

Short-sellers may have time to complete their deals before the law expires. Banks often take three to five months to approve a short sale, with 45 to 60 days more needed for the deal to close, said John Anderson, an agent at Twin Oaks Realty in Golden Valley, Minn., who specializes in foreclosures and short sales.

If you're early in the foreclosure process, though, it may already be too late to beat the Dec. 31 expiration of the law unless you arrange a deed in lieu of foreclosure, in which you hand over your keys in exchange for being released from your debt.

Otherwise, the process may grind on for a year or more:

  • Foreclosures completed in the fourth quarter of last year took an average of 348 days from start to finish, according to RealtyTrac. That's up 24% from the average 281 days in the third quarter of 2010, when lenders started re-evaluating their procedures in the wake of the "robo-signing" mess.
  • Foreclosures take far longer in certain states. The average processing time in New York is 1,019 days, RealtyTrac said. New Jersey's average is 964, and Florida's is 806.
  • Then again, the process is much faster in a few states: Texas, 90 days; Delaware, 106 days; Kentucky, 108 days; Virginia, 132 days; and Louisiana, 134 days.

Click here to become a fan of MSN Money on Facebook

Rushing to hand over your deed to your lender may be a mistake if Congress ends up extending the debt relief act -- or if you could qualify for a mortgage modification, a refinance under a revamped federal program or relief from the recent national bank settlement.

Also, you may not face a tax bill if your loan is nonrecourse, meaning the lender isn't legally allowed to pursue you for an unpaid balance -- and thus there are no debts to forgive. People who do face tax bills might not have to pay them if they're insolvent (if their total debts exceed the market value of their assets). Debts erased in bankruptcy court also aren't taxable.

At the very least, you should talk to a HUD-approved housing counselor about your options and perhaps consult an attorney before you decide what to do next.

Liz Weston is the Web's most-read personal-finance writer. She is the author of several books, most recently "The 10 Commandments of Money: Survive and Thrive in the New Economy" (find it on Bing). Weston's award-winning columns appear every Monday and Thursday, exclusively on MSN Money. Join the conversation and send in your financial questions on Liz Weston's Facebook fan page.