The short answer
Understand the system before choosing an action.
Bankruptcy is a federal legal process that may provide a court-supervised way to address certain debts. Different chapters use different structures. The process may involve required disclosures, court filings, trustees, creditor rights, property and exemption questions, repayment plans, discharge eligibility, fees, and long-term consequences.
Financial Learning Cafe explains the subject. Your current agreement, official sources, facts, jurisdiction, and appropriately qualified professionals control the decision.