OP, It isn't the sobriety that is destroying your marriage... the sobriety just happened around the same time. What's going on with your wife and this incarcerated, 24-yo recovering heroin addict is exactly why programs like AA strongly discourage people from starting new relationships within a year of getting sober. She's transferred her addiction from alcohol to this person, and that's a very unhealthy behavior.
Unfortunately, you can't make another person do anything. You can't make her commit to going to counseling or working on your (plural) issues. You can't make her stay with you. You can't make her fall in love with you again. You can't control another person's actions, you can only control yourself.
Listen, I know you love her, but your wife clearly has some serious problems that's she's not willing to address. As much as it hurts, this may be better for you. If she wants out of the marriage, why not give it to her? I know, I know... you love her and you don't want the marriage to end. I get that, I totally get that. But if she's determined to end the marriage, it's going to end whether you like it or not, whether you agree or not. Because you can't control another person.
If she wants to end the marriage, tell her she can move out of the house. Expose her emotional affair (because that's what it is) to her friends and family; make sure they know that she has decided to leave her husband and family for this other man. Do the 180
. I would also strongly encourage you to look into going to Al-Anon
meetings. The two of you may have also developed a co-dependent relationship without realizing it--I recommend reading Co-Dependent No More
Focus on taking care of yourself and your kids, both emotionally and physically. This is going to be hard for your kids, and they need a dad who has his sh!t together. If you can make them your priority, and see that caring for yourself is the best way you can prioritize them, that might help.
I'm not saying that you are blameless in this situation. You may have been horrible to her, and you are right to regret that; you should examine that behavior and why you did it, and look at how you can improve yourself so you don't repeat this bad behavior. But she's the one who decided to blow up your marriage without trying to fix things first, and you're not responsible for her behavior.
However, there is one question I am compelled to ask: Did she ever talk to you about the way that you treated you? Did she ever communicate to you that your behavior was hurting her? Did you listen to her, or did you sweep it under the rug? She may have been communicating to you all along that your marriage was in trouble... and when she felt like she wasn't being heard, she began drinking more. Rehab may have finally given her the strength to do something about. it.
Just some food for thought.