If, like many, you decide to walk away from your home, your best first step is to stop making payments and stay put. Except in a few states (mostly in the old South), you can stay in your home for a long period of time--payment-free--before you have to leave. This gives you a unique opportunity save big bucks that will help you secure new housing in the future. It also does your community a huge favor by preventing your home from sitting vacant for many months, gathering blight.
How does this work? Foreclosure proceedings typically begin after you have missed between 3 and 5 monthly payments. A few more months are likely to pass before your home comes up for sale at a foreclosure auction. If your home isn't purchased at the auction--which these days is typical--you will be able to remain until your home is put up for sale by a real estate company and you are legally evicted--all of which can take a good many more months.
Depending on your state, it can take a year or more from the time you decide to act until the time you need to once again start paying for shelter. Using this opportunity to save for the future will grease the skids when you need to find new housing, and will make it easier to live without credit, a worthwhile goal in itself.
To learn more about making the most of your housing situation, see The Foreclosure Survival Guide: Keep Your House or Walk Away With Money in Your Pocket, by Stephen Elias (Nolo), an essential tool for anyone at risk of foreclosure.