Bankruptcy frees up cash flow for your mortgage payments. Chapter 7 does so by writing off other debts. Chapter 13 does so more creatively.
Both Chapter 7 and Chapter 13 Improve Your Cash Flow
A Chapter 7 “straight bankruptcy” case would very likely quickly write off (“discharge”) many of your debts. For many people it discharges most of their debts, maybe even all of them except their home mortgage. That frees up cash flow so that you can better afford to pay your mortgage.
...