You are doing fine until you get to the part where you take it out on your boy. You’re right. He doesn’t deserve it. He is mistreated enough by one parent. He doesn’t need to be mistreated by his mom as well. You know your problem isn’t with the boy. It’s with your ex.
The answer to your question is in two parts:
For you: Find a therapist to talk to about how to manage your anger so you don’t hurt your son. You certainly have plenty to be angry about. You need to learn how to focus it. You might even be able to engage your ex in couples work for the sake of your son. If he refuses to come, therapy will give you an important place to figure out the best way to manage the situation.
For your son: It’s fortunate that the extent of his dad’s mistreatment is broken promises. As painful as it is to watch, he has to deal with his own relationship with his father. Your son will figure out for himself that his father isn’t trustworthy. Don’t say anything negative about his dad. That puts him in a loyalty bind. Instead, offer him your support. That means listening to his distress without jumping in to try to fix it. It means comforting him by telling him he is a lovable kid and by reminding him that there are lots of other people who love him. It means not trying to solve the problem but instead letting him know you have confidence in his ability to make the right decisions for himself about how he wants to respond to his dad. At 13, you can’t protect him as you once could. He is on the brink of adolescence. He needs your vote of confidence.
I wish you well.
If you have raised your son with good values about how to treat people, you can count on those values coming through.