This seems to be a very hot topic these days given the massive numbers of people that have been forced into foreclosure. First, let me say, you are not alone. Please don't let this get you down or get depressed - you can recover.
You need to ask yourself if you are ready to jump back into the market anyway. Renting can be a big relief in that you will spend less money out of pocket on repairs and maintenance, so while you are recovering this will keep your expenses down. Also, the market is still volatile; the worst thing you could do is put good money down on a home that once again loses value - that would be discouraging. Make sure you work with a trusted local real estate agent, that know what the market is doing in your area.
Do not attempt to purchase a home if you are buried in debt, have poor credit (middle score below 620), or don't have any money to put down. These are the kind of situations that led to the foreclosure crisis as we know it. There are hard money lenders out there that might seem to be helping you, but trust me the high fees and high monthly payments will make you wish you never bought another home. Take this time to repair your credit, so that when you are ready, you will have the best possible terms.
Perhaps you had a setback and you have recovered, but you don't want to wait the required 36 months following your foreclosure? Here are a few options:
1. If you are married and bought your home in only one spouses name, then congrats you are much closer than you thought. Simply work with a mortgage lender that will help you know what you need to do to obtain a loan with your spouses credit profile.
2. Find a Lease-Purchase home. This is a deal where the owner credits you some of your monthly rent towards the future down payment. Make sure they know that you need how every many months to recover from your foreclosure and don't let them sell you on the fact that they can "help you get a loan". The sad story is they may not care because if you can't buy the property after the lease term, you will lose all of the option money. Also, find a way to make sure they are current on their mortgage. You may want to write it into the agreement that they have to send you their monthly mortgage statement. There are too many cases of rental homes being foreclosed out from under the tenants. This is also a good reason to work with a realtor at a property management firm because they will make sure the rent is paid.
3. Owner Financing. Provided you can find an owner that doesn't need to get the equity out of their home and isn't going to take advantage of you, you can do a transaction where you pay them until you can qualify for a traditional mortgage. Document EVERYTHING including your payments (with canceled checks ONLY).
Before you know it, you'll be back on track just make sure not to buy above your means and get yourself in trouble a second time.