CM, Here are some things that you may want to look into.
Identify the issues that led your spouse to have an affair. First of all there is no excuse for infidelity, but some spouses do seem to find faults in their spouses. Lack of affection, not helping around the house, communication, anger issues, disrespect, and doing things together as a couple. Work on those things. Don't tell her that you are changing, show her.
Confront spouse about affair. Be specific about what is bothering you. Confronting is not the same thing as attacking. It is a meeting for clarification and that attacking is a hostile offensive that involves accusations, criticisms, and abuse.
Don't pursue or beg.This may mean that your spouse is given more opportunity to spend with OP, but that also means that they will find out that everyone has faults and irritating habits.
I did not do all of these things, but looking back I wish I would have.
Life's challenges are not supposed to paralyze you, they're supposed to help you discover who you are. -- Bernice Johnson Reagon