What a painful story. You have my sympathy. After 17 years it was surprising and unexpected unfaithfulness that finally ended it for me and AW. It hurts terribly -- and I have to warn you, to this day I have NEVER gotten a straight answer out of her on who what when where and definitely not why.
She fell off the wagon after 2.5 years right around the time she wandered off with other guys. Mid-life crisis perhaps, or just plain tired of being "good", I will never know.
It feels good to take control. Start making some rules and boundaries, as others have suggested here. There is one valuable thing out there that will make you feel better, and I call it FREEDOM.
Hang in there!