This will not be a happy answer. I've seen credit scores drop 200 points for a single foreclosure. If you default, it does not matter to the lenders how long you have paid, you will be hit the same. Your only ways out are to hold on to the property or sell for more than the amount of the loan. Do not fall for the banks' loan mitigation ploy: it is a cruel con.
And you have another problem. You are not covered by the anti-deficiency statute. So the lender may come back after you for the deficiency. You are also in danger of being taxed by the IRS on the deficiency, since they view it as income.
Please check one thing . . . If your deed of trust is in the hands of MERS, call me. Recent court decisions may allow you to escape.
To add to the above commentator's point on the IRS, you may have to realize gain on the cancellation of debt, and that realization is taxed as ordinary income.
However, there are a couple of COD exclusions that may apply to you. The first is the insolvency exclusion. The IRS applies a balance sheet insolvency test, and they (of courses) have a form for you to use to see if you are insolvent. You may then qualify for a reduction in COD income to the extent you are insolvent.
The other is the Qualified Real Property Business Indebtedness exclusion. This one is more complicated, but it may apply to your case if you were to lose the property or get your loans restructured in a way that the IRS deems COD gain. You should talk to an accountant who is experienced with calculating these exclusions if it becomes relevant for you to need that work done.