Low self esteem 😔

I’ve dealt with being cheated on in 2 past relationships and it really took a hit on my self confidence but after a lot of work I gained a lot of it back. I felt better about myself and good enough to start another serious relationship. Everything was great. He is my best friend my everything. We’ve been together for over a year now and he’s treated me the best I’ve ever been treated. I love him with my whole heart. We always support each other and I really felt like I could trust him without any doubt or insecurities. 3 days ago he was having an off day where he said he felt like a failure and he’s letting down a lot of people and he was talking about things that made him feel that way. So to help de-stress him I helped him make a plan for all the things he was worried about. So we went back to his place and I gave him some space to fully calm down and when he needs to calm down he reads. After he was done reading he asked me if he could tell me something and I told him “of course you can. You can always talk to me.” And then he went on to tell me that a couple weeks ago while he was at his best friends house after they had all been drinking, that some girl there had been flirting with him all night and so he grabbed her butt. I felt so crushed I felt my heart go into my stomach. I don’t know what to do. I know that what he did wasn’t as serious as it could have been but it’s still serious. I feel terrible. It’s like all that hard work to feel confident again was just flushed down the toilet. And I know I shouldn’t do it but I keep looking at her social media and comparing myself to her. Can anyone give me advice on my situation? I want to hopefully save my relationship because I really do love him and I know he feels bad about it but I know it’s not going to be easy.