The lenders have been doing this for years now. Lead you along with the promise of modification and then yank it away and foreclose. You may be able to buy some time with a chapter 13 bankruptcy if you have the means to make your regular payment plus enough to catch up over in the next three to five years. Otherwise, if you cannot afford it, you can at least delay the inevitable with a chapter 7 filing. You should consult with a local bankruptcy attorney.
If the mortgage company already reviewed your case and denied your application, you have a few options. You can fight the mortgage company in state court, but you need grounds to stop a foreclosure. You can consult with an attorney about bankruptcy; Chapter 13 will enable you to catch up the house but you need the money to make the payments going forward and a bankruptcy payment.
Consult with a bankruptcy attorney who also has knowledge of mortgage issues. Good Luck.
[This communication is intended as general information and not specific legal advice, and this communication does not create an attorney-client relationship.]