If you're not sure, then I recommend starting with the math. Let's assume the Mazda would last 5 more years, and that the Leaf costs $10,000.
Mazda cost over 5 years: 5 * (expected average insurance, registration, fuel, and maintenance) - residual Mazda value.
Leaf cost over 5 years: 5 * (expected average insurance, registration, fuel, and maintenance) + $10,000 - $3,900 - residual Leaf value.
I suspect the Leaf's residual value after 5 years will be a bit below $6,100, let's just say $4,100 for the sake of the example. Then will your operating costs over 5 years be at least $2,000 less with the Leaf? It seems likely, though electricity rates vary wildly across the country, and gas prices are unpredictable. You should be able to pin down registration and insurance costs, and then you can use this year's mileage to estimate the gas and electricity costs. Don't forget to add a 240v charger in the Leaf cost column if you plan on buying one.
If the difference in cost is sufficiently small in either direction compared with your budget and savings (only you can be the judge of this), just buy the thing and don't overthink it.
FYI we're in a similar situation with a slightly older Mazda. Ours is in kind of rough shape though, and I'm not even sure we could get $1,000 for it. For us, that tips the balance in favor of keeping the Mazda until/unless maintenance starts to get too high, or a large repair is needed. I hope that doesn't happen for a few more years, because by then the available options for used electric vehicles should be better than they are now.