If debt is canceled, I understand the amount forgiven is considered ordinary income. Makes sense so far.
Now, you have a capital loss (presumably, otherwise debt would not be canceled) on the house. Can the capital loss be used to offset the ordinary income of the house sale? Or are you stuck with taking just $3K a year of capital loss against ordinary income … for the next, say, hundred years?
If you can offset immediately, then you don’t really have to worry about the income from the debt cancellation. If not, then I would bet most people can only exit foreclosure via bankruptcy. If you are so strapped for cash you cannot make the mortgage payments, it is hard for me to imagine you having the cash to pay the IRS.