What can I do to fix it?

So I saw the guy who I’ve been missing for almost a year now for the first time since we stopped talking this weekend. I thought that I had progressed passed my feelings I felt in that relationship but I haven’t. And they weren’t like romantic it was the feeling that make me overthink to much. That make me feel bad or say rude things I don’t mean. I thought I was done with that part of myself but when I saw him I couldn’t stop my mind from running rampant. How do I fix it? What shadow work do I need to do? I don’t know what it is that makes that happen or why but I kind of feel like I ran from it rather than addressed it. I move to a new city but I still think about him everyday I don't know. What can I do to understand me more? I don’t want that happening in my next relationship
What can I do to fix it?
Post Opinion