How to get rid of a toxic guy if I am emotionally attached to him?

He's not my boyfriend. But we flirt kind of everyday but he's been acting quite distant since 2 days and I find it hard to deal with. He talks to a lot of girls online and his instagram is mostly full of girls and one of them is me. We grew close quickly and had conversations until the morning even until 6am and he asked me out on a date too, but haven't fixed it because we live in different cities plus he indirectly told me he isn't looking for a relationship. At first I never really cared much and mostly talked to him when I was just free but then I got attached to him too much. And now it's like I cannot function without thinking about him and talking to him. How can I put an end to this emotional attachment and move on for the sake of my mental health. I feel so drained and stresses out due to this issue

How to get rid of a toxic guy if I am emotionally attached to him?
Post Opinion