Your question involves a couple of twists and turns.
The first part is the purchase was done with “80/20 from Wells Fargo with both loans starting as HELOC’s”. Both were purchase money and in California are non-recourse if never expanded by adding charges to the LOC or refinanced.
The 80% may be (probably is still) non recourse and is not taxable. The foreclosure is the remedy. In California, a company cannot take two bites of the apple. If they foreclose on a loan, that is their only remedy. Some people might say that because the first was a HELOC, it is always recourse, but that is not the case in California. There is no debt forgiveness on the first, because it is a contractual/legal remedy, not loan forgiveness.
The second (20%) because it was refinanced is no longer purchase money loan and is recourse. The collections part is because the bank can come after you for all or part of the second. Any part of the second they “forgive” is taxable as “loan forgiveness”.
The real question you should be asking is “What will I do if Wells Fargo goes all the way after the total second mortgage?” There your options are pay it, negotiate it, or file for bankruptcy. The tax on debt forgiveness is only an issue if Wells is in a good mood.