I (20F) found my boyfriend (20M) emotional cheating on me

My boyfriend and I have a healthy relationship overall, but we've faced challenges, especially since this is his first serious relationship. I've been through my share of past relationships, and while we're both young, I feel we’re mature enough to understand each other and grow.

Recently, we've been distant due to personal issues—I'm busy with college, he's adjusting to a new work schedule, and he's been struggling mentally and emotionally. He visited me on Valentine's Day, and although I had a feeling something was off, I didn't want to overthink it. However, the next morning, I followed my intuition and checked his phone (I don't check his phone at all). I found messages that revealed he had been emotionally invested in an old friend and had sent inappropriate sexual messages.

I confronted him right away, and he explained that he didn't like her nor pursuing her, but we both concluded that he broke my boundaries. In addition, he had been planning to break up with me before but he realized it was a rash decision and he wanted to be better in order for us to stay together.

I understand he's going through a lot, and I’ve been trying to process this while respecting his need for space. But I feel betrayed and lost. I’ve told him before that I’ve felt unloveable lately, especially since we’ve been together for almost three years. It hurts so much that the emotional need I was longing for from him was directed toward someone else.

I'm working on healing and figuring out how to move forward. My friends tell me that "i'm too pretty for this," but what I really need is guidance on how to handle these conflicting emotions and navigate this situation. How have others dealt with similar feelings of betrayal and emotional distance in a relationship, and how can I begin to rebuild trust if that’s even possible?