One thing that you can do if you have gotten behind on your payments or you know you will no longer be able to afford your home is to qualify for a new home right away. If you have been paying on your home for more than two years and there is equity in it then a bank will qualify you. They will see the equity in the current home. You can buy a smaller home of lesser value with a smaller payment that you can afford. This will help you still have a home before you lose your other one. This is possible and it happens all of the time but you must act quickly.
Another thing that you might do when you recognize that you are going to lose your home to a foreclosure sale is to take advantage of the time you have left to live in the home and save as much money up as possible. The lender will send you a letter with a date of the foreclosure sale. These usually take place on the front steps of the county courthouse. This date is when the house will go up for sale and when you need to move out.
If the house sells at the foreclosure sale then you need to be out of the home immediately or the sheriff will have you removed. If the house doesn't sell then you may have more time. Most banks don't even show up at a home to see if it is still occupied and they take their time about removal. The amount of time this takes for the sale and having to move out of your home is an average of 6 months that you can save as much money as you can. Because of the market, many homes are not going to the auction for over a year. This is a long time you can live rent free and save what you can.