Depends on what you want to do. If you just want to delay the foreclosure, file for bankruptcy first and the court will issue a stay on the house. That may save you some time before foreclosure.