Q: Is a HAMP modification that included cancelled mortgage debt treated as earned income on my income taxes?
A: The good news is that no, the canceled debt from your loan modification won't be treated as ordinary income. On February 9, Congress passed, and President Trump signed into law, H.R. 1892, the “Bipartisan Budget Act of 2018” (the Budget Act, P.L. 115-123). This contained a series of provisions called "extenders" that included some expired tax breaks, including the provisions of the Debt Relief Act of 2007, which addressed both mortgage debt cancellation and allowed for the deduction of Private Mortgage Insurance (PMI) premiums.
You can find more information on how this debt is treated at: https://www.irs.gov/newsroom/home-foreclosure-and-debt-cancellation
Where it notes: "The Mortgage Debt Relief Act of 2007 generally allows taxpayers to exclude income from the discharge of debt on their principal residence. Debt reduced through mortgage restructuring, as well as mortgage debt forgiven in connection with a foreclosure, qualifies for the relief."
These exceptions are discussed in detail in Publication 4681. According to the above document, you'll need to fill out Form 982 and attach it to your tax return, but you should be in the clear. At the moment, it only covers debt forgiveness that took place in tax years 2007-2017, and there's no current indication that the Debt Relief Act will be extended for debts forgiven in 2018.