How to stop feeling jealous overthinking of someone isn't mine?

So i met this guy online, we both started as friends and i really liked chatting to him because he showed efforts and he was always there for me i used to tell him how i feel and about my problems with my family, he always listened to me and made sure to make me smile, i also told him the first day when we started talking as a joke to not treat me kindly or i will get attached to him and become possessive but the more we talked and the more he showed me care and filled me with compliments and attention the more i got attached and in May he told me that he is attached to me aswell so i allowed myself to become more attached and i start to become possessive, i get jealous when he is online and doesn't reply i overthink and tell myself he found a better girl!!

i confessed to him he said that he like me too but he can't be in a LDR. I said its okay we were friends at first so it doesn't bother me aslong as we talk like before.. then we talked abit better than before but then he started to give me late replies, sometimes i send him a text on 16:00 he reply the next day. I got exhausted and took few days to recharge without replying then i replied today.
I'm not that attached to him anymore i guess but i still feel a thing for him deep down, never met a guy like him before. He also said that he may come to my country next year on winter.. I don't know what to do anymore
How to stop feeling jealous overthinking of someone isn't mine?
Post Opinion