It might be a good idea to consider putting those investment properties up for sale. If you begin to fall behind on the payments, consider a short sale. It will affect your credit to a lesser extent than a foreclosure.
By all means, first do what you can to get the amount you are paying to your spouse reduced through the courts but it sounds like you're in between a rock and a hard place financially. I know it sucks. We're going through the same thing with our rental properties. More than 20 years of A1 credit down the chute within the span of 6 months.
Remember, though it may take some time, we will pull ourselves out of the bad credit situation by rebuilding it.