In an earlier post I warned that filing bankruptcy might make it more difficult to obtain a mortgage modification from Countrywide or other lenders while you are under the jurisdiction of the bankruptcy court. I suggested that it might be a good idea to hold off on filing bankruptcy if at all possible until you see whether a foreclosure workout with your lender is possible.
On October 17, however, in a letter to all mortgage lenders who hold FHA-insured loans (HUD Mortagee Letter 2008-32), the Department of Housing and Urban Development has made it clear that loss-mitigation efforts should move forward despite the fact that the mortgagor is in bankruptcy.
While the HUD letter doesn't constrain holders of non-FHA insured mortgages such as Bank of America/Countrywide, these and other lenders will often follow HUD policies, making it likely that you won't miss out on a mortgage modification opportunity if you decide that filing bankruptcy is in your best interest.
Of course, it would make sense for you to contact your lender to see whether it will be following this new HUD policy or whether your bankruptcy will take you out of the running for a mortgage modification. It also makes sense for you to check with a HUD-certified housing counselor by calling 1-888-995-HOPE.
To learn more about timing a bankruptcy filing wisely, see Nolo's article Should I File Bankruptcy Now or Wait?.