Bay back from investor would be illegal, that's true.
You can do a short sale, and while you are doing it, you can try to get cash from the bank (it does not happen all the time, but sometimes it does - depending on the bank).
This cash will help you settle somewhere else.
However, if you can pay for the house on your own, without your ex, try to do a loan modification or a short refi. You can call your lender and talk to them about all options available to you.
You can visit legal aid (if qualified), or an attorney (some do pro-bono work)...
Best of luck,
Beachfront Realty, Inc.