The bottom line is that your credit report shows a history of not paying people back. Filing for bankruptcy is only enforcing that thought. Think of yourself through the bank's eyes, if you weren't paying someone else, why would you be inclined to pay them? Banks don't want to foreclose, so it doesn't matter how much money you have to put down. They only want to be paid back, and on time, not whenever you feel like it.
I would talk to an accountant and lender to get some advise on what be in your best interest. I would think it would be difficult to get a loan with less than stellar credit in today's market, esp with many changes in the lending world in the past couple of years.
I think you will find it very difficult to get a home loan with a history like that, lenders have become very picky. Filing bankruptcy won't help you in the short term either. You likely need to seek some credit counseling and advice from mortgage experts.