This is something I struggle with as well. Some of it comes from my own perception of "respect yourself" that my mom ingrained in me as a child. She left my father - who was abusive and a cheater - and she did so with just $10 in her pocket and two very small children. She was very adamant throughout my childhood that I be independent, strong, and respect myself enough to not put up with someone treating me poorly.
I swore to my husband when we were first together that my dealbreakers would be anything that betrayed that respect - affairs or abuse.
When I found out, I was so shellshocked I didn't even know what to think or do. And I was hesitant to say anything lest I later regret it - either committing to try with him or telling him I was leaving. I ultimately only promised him until the first counseling session, and that was only if he met all of my requirements. He did and it left me even more confused about my own feelings of what I felt I *should* do (leave) versus what I *wanted* to do (try to fix this).
I talked with a friend who went through infidelity with her husband and said they came out stronger. I found out my grandmother dealt with infidelity and came out stronger with my grandfather. A mantra started in my head of "when something breaks, you fix it, you don't toss it out."
Mostly what comforted me was talking with my mom and my MIL though. My mom was completely shellshocked as well as my husband is nothing like my father - absolutely nothing like him - and so she never would've expected this betrayal of him in a million years. My MIL was shocked and said she has no clue who he is.
After I told my mom that I wanted to try and work on it, my mom told me - my mom, the strong one who walked out with $10 and two preschoolers - told me that if she'd had my marriage, she would've stayed and tried, too. Because she believes in my husband. And she believes that I need and should see for myself if we can fix this so that if I do walk away later on, I will have no questions about it.
And talking with them also affirmed to me that whoever *this* man is not the man I married, and that man got broke or lost or something along the way... and if anybody can come back from this and put in the work and change, it is him.
So I no longer feel like I am betraying myself. Sometimes I feel weak and wonder whether it's the weakness in me that's driving it, but I dont' feel that so strongly anymore and don't wonder it so much. Because this - staying, trying, dealing with it - is actually much harder and requiring way more strength than leaving. And as for betraying myself, I have multiple parts of myself and they feel differently depending on which part i'm focusing on. But the overall me is made up of all those parts, and the overall me knows that this isn't betraying me but rather staying true to my own values, beliefs, and strengths about at least trying and putting the work in before giving up on something that meant and means the world to me