Break up after a somewhat long relationship

Short story: My boyfriend and I, well now ex-boyfriend, were together for almost 5 years off and on... We got together when in high school, Infidelity was involved (Don't judge please. I know some of you like to say "I" would never do that and all that...). Both changed us for the better in a few ways but mostly for the worst. Breaking up was best but still hurts because after all we were/(are?) each other's best friends. 
How do you deal with moving on? Not to another person because I'm not focused on that but moving on with your life and just living for you?