It's not clear which spouse you are concerned about, or whose house is being foreclosed upon. Assuming your ex-wife is still in the house you co-owned with her, and she has been unable to make the payments, I surmise that you are contemplating bankruptcy to avoid liability for the defaulted mortgage. If my assumptions are correct, it is still not certain that you would need to file bankruptcy because of the foreclosure, and your current spouse could be affected financially if you are forced to file a Chapter 13 bankruptcy in the event that your income or assets exceed the limits of a Chapter 7. The "means test" requires evaluating all the household income for you and your current spouse, and you would be viewed as an economic unit even if your current spouse does not file with you (and that is not uncommon.) So I would advise you to wait and see what happens with the foreclosure, and if you are held liable for a deficiency between the auction price and the mortgage debt, then you can do a cost-benefit analysis of the advantages and disadvantages of a bankruptcy.
Answered on Jul 09th, 2014 at 2:35 PM