Your story is not very clear to me.
But from what I read:
Take all the critics by now … (I know it’s hard – but it’s a mental thing you don’t really have the choice anyway) but the problem/responsibility is that as parents, what is important are the kids (way before ourselves).
More you defend yourself less they would like to hear (if they suffer too from the situation at the moment). The main problem in between you and your sons is maybe not only their father’s influence only. When you talk with them the main subject should be them and only them, they can’t be supporters or actors to relieve your pain (they are kids) wait for that.
I could be wrong but (try to think about it in taking care) maybe they are not really mad at you because you left daddy, they could be mad because they might think that you left them somehow – you throw the babys with the bath water : Are they happy with their father? Do they feel unprotected/unsupported with only him having the custody? … Maybe it’s not about your story with him, maybe it’s about your story with them and the fact that they feel left alone. It’s a big deal for a kids.
Depending on their age (I don’t know how old is the last one) they will be able to get the point or not about what happened in between you and there father (sooner or later) …
The hardest (for them and for you) is the feeling of being left in a situation that you don’t want to be and can’t fight against it … (you know the why but they don’t know exactly and it wouldn’t really change the problem relatively to them). They are putting you in the same situation. (I mean they probably suffer as much as you do – they feel or felt abandoned).
I don't know for real : it's just a suggestion but Maybe this is the real trouble you have to deal with your kids.
Get support for yourself (any kind from professionals and friends) to be able to be strong and there for them when they'll need you.
Take care …
Wish a lot of support.