Bankruptcy does not mean that you will lose everything. Retirement accounts (401(k), IRA, etc.) are generally exempt from seizure in bankruptcy. You and your spouse are also entitled to a $34,200 homestead exemption against your principal residence.
If your secured debt does not exceed $1,149,525, then you can file Chapter 13 and you may be able to force lenders to modify your mortgages on the rentals to reduce your principal balance (called a "cramdown"). If your secured debt is greater than that amount, you would have to file Chapter 11, which is much more costly from a legal expense, and sometimes this expense makes a bankruptcy with a cramdown unrealistic. In which case, you might not be able to file for bankruptcy, because your income may be too great for a Chapter 7
(liquidation). Your total income must be less than the state median for your family size (1-4 family members: $42,089; $52,618; $58,916; $70,763; add $8,100 for each additional person).
So, things may not be as bad as you think -- they may actually be pretty good. You need to sit down with a local bankruptcy lawyer and put your financial cards on the table, so that the attorney can figure out if any bankruptcy Chapter will work for your circumstances.
For a referral, see this link
Hope this helps.