I'm sure there are ways in which we could have been better spouses. And that is something to take responsibility for and work on. However, your W had choices and she is responsible for those. She could have told you how unhappy she had become. And that things needed to change or she would leave. She could have left and filed for D.
Instead she chose to be unfaithful. That is the part that she bears responsibility for, not you. Infidelity is a choice.
T 13 M 7 Me 48 H 46 SS 15 BD 7.14 PA D final 5.16 (H filed)
We receive & we lose, and must try to achieve gratitude & embrace with whole hearts whatever of life that remains after the losses - Dubus