Help please

Me and my ex boyfriend been so on and off for bout 4-5yrs now, i seem not to get over the fact hes fucked and mess w other girls. It hurts sm to know he gave these girls attention and more he could give me. But now he wants to be with me and i deeply want to be with him but i cant get over the pass cause its just hurts , all those girls he’s messed with were so much prettier then me and it just hurts to know like he really gave them his time and now wants to give me his time. Overall question is , how do i get over the past and forget everything , plus is it necessary to hate the girls hes messed w or had sex?