The Mortgage Forgiveness Debt Relief Act of 2007 changed tax rules so that when mortgage debt is fogiven by a lender - as in a short sale, foreclosure or debt restructuring of a property - the amount forgiven is not considered part of the taxpayer's gross income, and therefore not subject to income tax, as had been the case previously.
The debt must have been incurred when buying or improving a principal residence, and the exclusion only applies to debt which was forgiven in 2007, 2008 and 2009. The excludable amount of debt is limited to $2 million or $1 million for married filing seperately.
There are some other restrictions which apply, so be sure to consult a knowledgeable tax professional for all the details. You can also go online to www.irs.gov and enter "Mortgage Foregiveness Debt Relief Act" in the search window. A newly revised Form 982 is used for reporting the exclusion.