I'm not sure I understand this. At the start of your post, it sounded as though it was your H's decision to leave and that there is an ongoing other relationship for him. Yet you ask have you done the right thing? It doesn't sound like you had any choice.
If you mean, have you done the right thing all these years in putting up with unacceptable treatment and a terrible role model for your sons, then of course the answer is no.
Why do you need to forgive your H? As you say, you can't forgive someone who is not sorry.
You might need to forgive yourself though. You let yourself down badly. You may have told yourself all these years that you were staying with him because it would have been better for the boys, but very often I think that's a comforting delusion and in fact you were staying with your H because of your needs, not theirs. That is not meant to be unkind, but part of your self-discovery and healing involves challenging what you may have believed in the past.
The message you should give to your sons in a proper sit-down talk is that you very much regret colluding with their Dad's behaviour towards you all, over the years. That you did this because you love(d) him and that you had made false bargains with yourself that the boys would be better served by having an intact family. That you are worried that they have as a consequence absorbed a skewed belief that it is acceptable to treat women and children this way and you need them to know that this is not a healthy relationship.
I'd really advise some proper therapeutic help to process this and confront some of the bargains you have made over the years. There may be a point when you start to despise yourself for your weakness and you'll need someone supportive encouraging you through that phase.
But you can move on from this and take those lessons learned into new relationships, when you are ready. You would be incredibly wise and kind to yourself for now to heal with help and gradually grow into the person who will have high esteem and high expectations.