You might be burning out, but this is the "good" case of burnout in that there's an obvious cause, and if that cause is attacked head-on, your passion for your work will probably return. It's obvious that your clients are treating you badly. Not paying for work completed is never acceptable. It doesn't matter if "we didn't use the code". You did the work and should be paid.
Get an attorney immediately. I'm not saying you should sue previous clients. If the amounts of money are small, it's not worth it. But in the future, he will save you a lot more money than he costs. Every serious freelancer has one, for exactly the reason you've discovered. Get firm contracts written with unambiguous terms regarding project scope and payment, or you will be dealing with this for a long time.
Get an attorney immediately. I'm not saying you should sue previous clients. If the amounts of money are small, it's not worth it. But in the future, he will save you a lot more money than he costs. Every serious freelancer has one, for exactly the reason you've discovered. Get firm contracts written with unambiguous terms regarding project scope and payment, or you will be dealing with this for a long time.