Ugh. What to do?

Hi ladies. Long story short...my boyfriend cheated on me a year ago. They had sex off and on for about 10 months. Only when he was drunk, but let’s not give him credit. Tonight I was working and I noticed he was very close with a girl and started messaging her on Facebook. I was trying to talk to him all night and he was just always on his phone. I told him I was upset asked to see his phone and he refused. So me being a girl I hopped right onto his iPad and looked at his messages. ( I feel like privacy is not a problem if he is being shady). Anyway they were definitely talking, nothing too intense but my bf is very flirtatious and it’s just a problem if he is able to reel in a girl. I just feel hurt and I really don’t want to go through this again . I just need some encouraging words right now, so if any of you girls feel nice or have any words of encouragement feel free. ( meant in the most sincere meaning) thank you ladies, have a great night!!