When a lender forecloses on property  sells the home for less than the borrower’s outstanding mortgage debt and forgives all  or part  of the unpaid debt  the Tax Code generally treats the forgiven portion of the mortgage debt as taxable income to the homeowner