Why is it that I may have both gain (or loss) and COD income upon foreclosure of my house?
In many home foreclosures, the mortgage debt is recourse and the fair market value (FMV) of the house is less than the unpaid face amount of the debt. Often in this situation the borrower/debtor transfers the house to the lender (or to a third party), either through a deed in lieu of foreclosure or as a result of a foreclosure proceeding. This transfer is treated as a sale or other disposition of the property and results in the borrower/transferor realizing gain or loss. At the time of the transfer, the lender often cancels the remaining mortgage debt, leading to COD income.
Different rules may apply if the mortgage debt is nonrecourse.