How do I get over my ex

Me and my ex broke up a month ago, because he was being an absolute dick to me but the thing he is I genuinely loved him and still do, but he did things like send nudes to my best mate and said he likes this lass while we was together, then when he split up he shagged the lass who hates me the next day, but then he says he didn't mean to and I am the only lass for him and he's begging for me back but I know I should be in a relationship with someone who treats me like that but I actually love him, any ideas of how to get over him