Not the exact same experience, but I went through something similar. Married, with a kid, but it turned out we just didn't have anything in common. Eventually the marriage devolved into barely even spending any time in the same room together. Teh secks had long been out of the equation, and it was just a matter of "staying together for the kid". I was even given permission to go find some on the side, as long as it was outside of our social sphere and the wife didn't find out about it. Of course then she snooped and found out about it, revoked permission, and we tried therapy (three times). Things got worse again and permission was again granted, and I learned to be even more discrete (new email addresses not accessed from my phone, private browser, etc). Thanks Ashley Madison!
I had some fun, for sure, but never felt great about the situation morally even though I could (and did) justify it with the "permission" and the wife's declaration that teh secks was out of the equation (mental health issues). But I started to realize that being miserable just for sake of "staying together for the kid" wasn't worth it, life is too short. Plus, I didn't want my kid to think that's what one should expect out of a marriage - it was a terrible example. Eventually I connected on FB with someone that I did have things in common with, and all of it combined to finally give me the courage, and decency, to end the marriage.
It wasn't easy, mostly because of the child factor, and it wasn't cheap but almost 4 years later everyone is in a better place now. I have my kid 1/2 the time, the ex is engaged, and I'm still with the woman I connected with (34DD, for the record).
All that being said, my advice to OP would be to forget all about old flame and cut off contact, commit to the marriage, try the therapy route, and try to make it work. Or you just rip off the damn band aid and get a divorce. But do one or the other. It sounds like you want to do the latter, but are afraid to do so. IMO life is too short to be with someone you don't want to be with, and that goes for both you and the wife.