The most direct way to keep your Mazda is to get up to date on your payments. As long as your payments are on time, the lender can’t repossess your car. You may also be able to reduce your car loan amount, also known as a cramdown. In a cramdown, some of the amount owed on the vehicle becomes unsecured debt and becomes part of your payment plan for other unsecured debt.
If you can’t afford the payments, however, surrendering the car or having your court-appointed trustee sell the car is often the better option. Do the math to see if the Mazda fits your budget.