In Ten things about debt forgiveness by Stephen Fishman, Tax Expert, Attorney, and Author, gives some useful information about the limitations and tax consequences involved after a mortgage debt is forgiven.
Income tax after debt forgiveness
In 2007, the Mortgage Forgiveness Debt Relief Act made it possible to exclude up to $2 million of a forgiven debt from your taxable income, $1 million for a married person filing separately. This means that you don’t have to pay income tax on a forgiven debt.
What qualifies
This law also covers second and third mortgages, which have been used to buy or substantially improve principle residences.
Debts forgiven on second homes, rental property, business property, credit cards or car loans do not qualify for the tax-relief provision.
Check out the full article linked above.