Honestly, it is not very promising if a Foreclsure is part of your credit history. Could be 3-7 years before you can purchase again. Since divorce is a hardship you may want to consult with your Local Bank or a Mortgage Broker. Best of Luck
If you are early on in the foreclosure process I would suggest you try to sell your current home in a short sale or deed in lieu of foreclosure. If you and your soon to be ex husband are both on the deed and / or mortgage you will both need to be in agreement to proceed. I also suggest you act quickly & each of you seek advice of your lawyers. If you have a foreclosure on your record it will be at least 7 years until you will be able to purchase a home again, but there are rent to own and owner carry options that are available. I would be happy to help list your home as a short sale and help you find another home with alternative financing.