If your cost basis in the house is more than the mortgage balance, then there would be no capital gain to pay tax on, regardless of whether the lender forecloses or does a DIL and 1099's you for the difference between the value and the mortgage.
It's also possible that CA will adopt the federal law that forgives the taxes in these situations.
You'll need to see a CPA to disclsoe your particular situation and make the appropriate tax decision.
Disclaimer: Please note that this answer does not constitute legal advice, and should not be relied on, since each state has different laws, each situation is fact specific, and it is impossible to evaluate a legal problem without a comprehensive consultation and review of all the facts and documents at issue. This answer does not create an attorney-client relationship.