Bae slept with someone else

I was in a LDR relationship with a chance to live together in 6-7 month and we loved each other. one day he said he wants to break up with me, I was shocked, there was no reason, we were all fine.
Anyway he broke up with me but we kinda kept in touch because we couldn't stop love. 
1 month passed and we didn't talk anymore. Now one of our common friends told me that he has slept with someone (we were both virgin) and my heart broke so bad.
I know I don't have the right to be upset, but I am, we talked on the phone, we're not gonna get back together but he said he loves me and that sex with a random girl experience is so bad that he doesn't wanna be reminded of it.
I just can't stop imagining them, it's driving me crazy, I need help, what should I do? It's killing me.