I’ve thought about renting out my house and buying a second home.

Is it better to have 2 separated mortgages or consolidate them?

Our home had two mortgages. It foreclosed a year ago, but the second mortgage is open. We believe that bankruptcy is the only way out of it but does anyone know any other way out of it? We don’t know any details of how much the first mortgage got for the home and why the second didn’t foreclose. By-the way, the home was in VA.
Thanks for your responses.
My husband and I are getting divorced. he left me with bills I can’t afford. I’m in danger of losing my home and I know I can afford to pay on the mortgage itself and the utilities with only my income but I couldn’t possibly afford a second mortgage payment too. I’ve been thinking of bankruptcy because he has everything behind and I am in debt I never knew existed. Is there any way for me to keep thje house without paying 2 mortgages? Any suggestions?
I had 2 mortgages, one for 80% and one for 20%. The first mortgage company foreclosed. It was sold. The second mortgage company did not foreclose. Public records now show my name and the new owners name. Do I still own 20% of the house?