You need a lawyer. I'm not a lawyer, so what follows is not legal advice.
And sorry: You need to provide more details. For example, what arrangement do you have through the "investment company" in which they're supposed to pay the mortgages?
For instance, if they're management companies, read the contract. They'd likely be in default, so you would regain control, per the contract. Then--I'd guess they're collecting rents which they're supposed to be using to pay the mortgages--you'd receive the rent and pay the mortgage.
On the other hand, if you sold the properties "subject to" the existing mortgage, with the investment company promising to pay the mortgage, then you no longer own the properties and there'd be no way to take them back (unless the owners were willing to deed them back to you).
You say "it looks like the bank is going to go bankrupt." What bank? The one who holds the mortgages? If so, that really doesn't matter if the bank is FDIC insured...and maybe even if it isn't. Someone else will purchase the bank, or its assets will be liquidated. You'll still be paying your mortgage to someone. And the deed wouldn't be affected in any case.
You might be able to do a deed in lieu of foreclosure if the lender permits it. Some do. Many do not.
Your credit would be negatively affected by a deed in lieu of foreclosure, short sale, or foreclosure.
Please provide more details, or e-mail me directly.