I feel your childhood issues rearing their head. I was in a great space in life prior to discovering my life was a lie. I felt so loved and safe and comfortable in our relationship, and realizing that was a false sense of security really pulled the rug out from under me. I started seeing a pathetic, unlovable, ugly old woman in the mirror and I had to avoid them for a while. It took me a while to connect the dots to my old childhood issues, so you at least know where these unkind self thoughts are originating. That should help you to banish them when the trauma settles.
One of the hardest things for me was to re-learn how to love and appreciate myself again, through my eyes, and not through the eyes of my WH. I am getting there, but I have noticed a huge change in my vulnerability to negative feedback or criticism from others, and I began to shape any negative comments through the lens of my hurt inner child. I keep feeling that the pushback I get is not about what I'm doing, but who I am fundamentally. I trigger to this hurt feeling that people who claim to love me don't actually like me for who I am. I'm working on stopping that negative inner talk, and trying to separate how others make me feel from how I feel about myself, and how I identify as a person, and I work a lot on staying true to my core values, whether anybody likes them or not. I really hate spending all this time and mental energy on banishing old demons again. I really, really hate when my brain adds to my pain with stupid crap from past, or unkind self talk. I have told myself to shut up out loud, I have shouted ENOUGH! or NOT TODAY! and forced myself toward kinder more positive thoughts. It is really easy to fall back in to the pity party and the self abuse in the early stages. Try to force yourself to be kinder to yourself, because you know those comparisons are cruel, and you are adding to your pain. Stopping unwanted thoughts is what has pushed me back into IC to get EMDR to reboot some of the cycles I am stuck in. I have hope that someone smarter than me can help me get past this, because I am ready for a change and I have accepted that I need real help to get there and it's OK to need help.
In the early aftermath, I felt so unwanted, unattractive, all the crap that being cheated on makes you feel. I worked hard, like tushnurse, on wearing clothes that made me feel good, appreciating the stress induced weight loss, embracing my friends and hobbies and rediscovering myself. It helped a bit. It also helped me to keep reminding myself all the things I am, and realizing that letting my self worth be reflected by my marriage and my WH's love for me was not healthy, with or without the cheating.
I'm going to suggest that you stop torturing yourself with the comparisons. We BS have all done it, and I can't help it sometimes either. But I can assure you, the AP was chosen only because she was not me, she could have been anyone, and I realize now that my WH's choices are a reflection of his low self esteem and not mine. I'm a short brunette and she was a tall blonde. I think it might have been worse if she resembled me in any way.
In terms of practical suggestions, I like to focus on the brain stuff, because mine makes me crazy sometimes. The brain loves repetition and patterns, so the more you expose it to a thought, the more it will come back to that thought. You need to feed your brain other thoughts or find ways to disrupt the pattern. There are lots of little tricks - wear a rubber band on your wrist and snap yourself when you go down the wrong mental path. Use a fragrance or sensation to distract your thoughts and force a redirect. Use a mental safe space to go to when these thoughts attack. I have used the ocean for mine, and crank up ocean sounds and go to my happiest memory place. Another thing that helped me in an odd way, is embracing my inner hurt child and my inner hurt old lady with love and kindness, and caring for them as though they were real people. It helped me to feel real empathy for myself, and to acknowledge how awful things had gotten, and to offer myself the purest self love I could muster. It takes so much work to shove aside the negative self talk and not let the low self esteem creep in, but in your darkest moments I hope you can remember how awesome you are and know that in time, those horrible thoughts looking at photos will fade and you will see yourself for the lovely person you are, without comparison to anyone, let alone a person with no morals who would trespass in another's marriage. Another trick I use on myself when I go down the negative thought path is to chide myself for allowing the pity party to start in the first place. Poor little me.... feeling sorry for myself again. I loathe self pity, so I try to spot it when it creeps in and shame myself out of it. I will use my own baggage against myself sometimes if it helps me to redirect.
This is basic, but I have to remind myself occasionally that these thoughts are not true, they are the nasty byproduct of betrayal. I remind myself that this is a trauma based, predictable response for most BS and I try to take away its power by knowing it's source and accepting those thoughts have no power but the time and energy I give to them.
I still can't look at photos of us from the cheating decade. I get too lost in feeling sorry for the clueless loyal loving person I see looking back at me, and I get really confused trying to decode who I'm standing next to in those photos. I avoid them, still, years downstream. I have an album on my phone called Me, and it's all my favorite happy pics from the cheating years, but without WH in them, just me, kids, friends and pets. It is a beautiful reminder of how awesome my life has been, regardless of the cheating and helps me to see myself as lovable, loyal, successful, and at times, even pretty.
If it helps, list all the things that are awesome about you. If you can't think of any, ask a friend. Hold tight to those qualities that make you feel good about yourself. Remind yourself that if your WH's AP was a super model or a troll, it is still a rejection that will hurt, but says nothing about who you are, only who your WH chose to be. I imagine that if the AP in your case was hideous and gross, you would still be fighting those childhood demons. Rejection is rejection, no matter who it is with. Maybe that idea can help you let go of comparisons, accepting that your self esteem would take a hit no matter what, and then trying to manage it through that lens.
I don't know how far out you are, but I know in time, you will get your bearings, and your confidence will return. This low self esteem phase is just one of the ickier parts of the healing process. Don't let it pull you in, just accept it as part the bumpy road you have to travel to heal. I've been through lots of PT for injuries and I think about my broken heart the same way I do my spine. I have to work to keep it healthy, and there is a predictable process of deeper pain before progress every time. It's knowing things will improve that gets me through the pain. I try to keep that same thought process about my recovery. Maybe it can help you to accept that you currently can't see your value clearly because your lens is foggy and smudged from infidelity. It just takes time and work to get back in focus, to reframe and see things better in a more positive light.
Wishing you a quick sea change. I hope soon that you wake up every morning and look in the mirror and tell yourself that you are amazing and awesome and go seize the day.