Friend breakup

How can I get over a friendship breakup that happened almost 2 years ago. I occasionally still see her in person or on social media. For a myriad of reasons, I do believe that no longer being her friend was most likely the best thing to do, but it still pains me. I think of her WAY to often and vacillate from wishing her well in her life, to being so mad that I just want her to see how wrong she was/is, etc. It’s so middle school and I just need to MOVE ON, I need to move on as it’s so distracting …. but I’m stuck in this loop. Please help me with some better thoughts about the situation. Thanks!!