Hi there,
I identified with your story. Not from your side, but because I've lived through that. I was with my ex-husband for 9 years and something similar happened with us. What struck me is that my ex seems to have some of the same guilt. BUT...he isn't doing anything about it. YOU are doing something about it. You are getting help. And I commend you for it.
I understand feeling guilty. When we do things that are wrong, then consequences are natural. So the things you see happening with your kids, and the sadness you feel for your ex-wife...this is a normal course of event. Not good, no. But normal.
What I would say to you is...first you have to forgive yourself. That is the biggest step. I long ago forgave my ex-husband for what he did, but the consequences of his actions still came. And they continue to come because he cannot forgive himself nor deal with the guilt in a healthful way. He is just creating more of a mess for himself now.
So forgive yourself. Give yourself permission to feel guilty, but also give yourself permission to move forward in your life. You can't change what you did, and you can't change the consequences of it. But you CAN control how you live from this day forward. And what you did does NOT have to define you. You define yourself by how you are NOW, TODAY. Not by what you have done in your past. To help illustrate this...when I was early in my marriage, my ex-husband was a good man. His past didn't matter, his future didn't matter. What made him a good man was how he was AT THAT TIME. Then, he messed up. And continued to mess up. And CONTINUES to mess up, and this is what is defining him today. If he made a decision to forgive himself, move forward, etc...then he could be defined as a good man (who simply has now made some mistakes in life, as we al do) just as he was defined as a good man before it all happened.
Also, realize that your ex-wife will probably forgive you for what you did and that she may have already. And that as long as you hold yourself in contempt, you won't be able to start to make things right and get your life back on track.
Just repeat this to yourself: I am not a bad man, I am not a bad person. I just messed up. Maybe a lot! But I messed up, and we all do it. And I choose to learn from it.