You are asking tax advice. I am a Realtor, not a CPA.
I recommend that you discuss your question with a CPA in your area. Your lender should still provide you with a statement showing the interest and principle that you have paid.
Now if you are concerned about future liability, again, discuss it with a CPA. Also, if you have not already done so speak with the lender regarding any options that you may have. A Realtor may be of some assistance with this process.
I have a blog you can read about the foreclosure process.