The answer is maybe.
Under “The Mortgage Forgiveness Debt Relief Act of 2007,” taxes that would be owed on monies un-recovered in a foreclosure or a short sale are “forgiven” if you fall into the parameters stated by the Internal Revenue Service.
The law was established by President Bush in an effort to give relief to tax payers that have lost their primary residence to foreclosure or sold their primary residence in a Real Estate Short Sale.
If the property you are selling or are losing to foreclosure is a 2nd, investment or vacation home, then you may not qualify. You must present a hardship to the IRS such as “insolvency” to be considered qualified.
It is not automatic and you must submit IRS Form 982 upon filing your taxes to be considered for relief from these taxes.
More about The Mortgage Forgiveness Debt Relief Act of 2007 can be found at: http://www.irs.gov/irs/article/0,,id=179073,00.html
As always, consult the expertise of a CPA or tax specialist to qualify your options.