Not every client is worth keeping, even a paying one. The math that matters isn't just the invoice total, it's the invoice total minus the time spent chasing payment, managing scope creep, and absorbing stress that bleeds into other work.
Check your contract for a termination clause, most freelance contracts allow either party to end the relationship with written notice (commonly 15-30 days). Finish or hand off any work already in progress if you reasonably can, since abruptly stopping mid-project can create real problems for the client and hurt your reputation.
Keep it short, professional, and don't over-explain: "I've decided to wind down our working relationship as of [date]. I'll complete [remaining deliverable] by [date], and I've attached a final invoice for outstanding work. Thank you for the opportunity." No need to list every grievance, a clean exit protects your reputation more than a justified one.
Send a final invoice through the normal process, and don't discount it as a parting gesture, you did the work. If a dispute is likely, the Dispute Bundle generator packages your invoices and communication history into one document.