Many people worry that they will lose their home if they file for bankruptcy. However, most people may still be able to keep their home when they file. It will all depend on different factors such as where you live, how much equity you have in the property, how far you are behind in the mortgage payments, etc. If you have limited equity in your house or no equity whatsoever, then you can file Chapter 7 without the bankruptcy trustee even taking an interest in selling your house. Additionally, exemptions allow an individual to “exempt,” or keep, certain kinds of property. Most people that wish to file bankruptcy are unlikely to have a great deal of money or property stashed away. Otherwise, they probably would have paid their bills. It is likely that unless you own a valuable car that’s paid off, a house with a lot of equity, a valuable inheritance or lawsuit, or some other kind of unusually valuable property, you will be able to keep everything you own as “exempt.”
If you do keep your home, you will typically be required to "re-affirm" the debt. That means that if you default on future mortgage payments that the bank can come after you. Your bankruptcy filing does not discharge this debt.
As for obtaining a mortgage modification, I not exactly sure how, or if, your filing will affect things. It would be well worth your time to consult with an attorney. For the cost of an hour or so it will be well worth it. If even that expense is an issue for you, see if you qualify for representation by Legal Aid. Additionally, if there is a law school nearby to where you live see if they have a legal clinic; they typically handle these type cases. Finally, you can contact your local county bar association and see if they have a list of attorneys that will handle your case "pro bono (for free) or at least take your case on a reduced fee basis considering your income.