I would consult an accountant. Regarding the principal loss you are most likely out of luck. I don’t know if you can carry that against any possible capital gains in the future of your life. Again, talk to an accountant.
Also if you are paying interest on loans associated with getting out of that home, you may indeed be able to deduct that interest. Again… talk to an accountant.