For me, the key was to realize (and this may not be the case in your situation) that the affair was a result of something broken in him. In our case, his affair was without QUESTION a result of the ways he was raised to understand himself and his manhood... it left him fragile in a way I am only recently able to understand.
When I was able to see that the affair was a dysfunctional response to depression, I was able to see him differently. I have had my own struggles with depression, and my own struggles with social ideas of womanhood.
It humanized him, and it helps that my spouse is deeply and profoundly contrite.
I have decided to be grateful for our capacity to find each other...to choose each other... after a wild fire burned all that we thought we have to the ground.
In the face of that devastation, we still chose reconciliation. We still chose each other.
That's kind of amazing.
That's worth some gratitude, at least for me.
In saying this, I recognize that this is due in large part to his efforts to show profound regret and to embrace the work of recovery.
In saying this, I recognize that I am still wounded and trying to understand which wounds came from his affair and which are ones I brought with me into this marriage.
It's a journey. I choose to be grateful that we are on the path together, even though it has been hard and unspeakably painful.
Make sure, though, that you are RECOVERED enough to even think about gratitude. First 6-8 months? Hell no. About a year in, I can do it. I have recovered enough--and he has done enough work--that I can do that.
Betrayal is a trauma. Recovery is a journey, not a race. Love how far you have come, forgive that you are not where someone else thinks you should be.