It depends on the type of bankruptcy you file. Chapter 13 sets up a plan to pay back your debit. You will still be required to make you mortgage payment. Chapter 7 eliminates debt but will not guarantee you keep your home. Filing bankruptcy may give you time to not make payments and find the best option for you.