my (now ex)boyfriend cheated. is it too early to move on?

my ex and I were on a break then got back together two days later then we both went to this party the next day (I had to leave cuz I had work but he was passed out drunk) he broke up with me the next night. a week later I find out he made out with some girl at said party after I had left. my heart was broken. parts of me still care for him but for him to cheat is a complete betrayal and disregard for our 8 months together. 3 days later, a guy friend that ive known for three years that obviously likes me but would never do anything whil I was in a relationship (and I on the other hand am faithful) asked me to hang out. we ate, talked (he was cheated on too so we talked about that) then we kissed and ended up having sex. it was great and I felt happy after but the problem is I feel like a terrible person for having sex so early after the break up. any opinions or advice would be helpful :)