Is it okay that I ghosted an online friend cause its better for my mental health?

Well i found this online friend when i had nobody to help me and when i had family problems and i used to run to him and tell him what bothers me and we used to text for hours and he supported me and calmed me but with time our bond got stronger and we started to talk about everything (i mean nsfw) and he used to be very clingy with me and compliments me and he also said that he is attached to me so i allowed myself to get attached to him too.. 2 months passed and i confessed to him that am attached and i like to be with him he said that he can't do LDR and he can't imagine having a partner like me cause am naive immature and not healthy for him. Weird but why telling me this after telling me his interested and like to talk with me and feels attached. Okay i forgot about it and and we kept talking but not like usual, we can go days without talking when i tell him am exhausted and he would text after 3 days and we talk again, but i lost interest in talking with him, the days when i don't talk to him were BETTER for me and my mental health, i don't miss him anymore and he also mentioned that he will come to my country in winter and wants to meet me, i don't want to meet him anymore like I used to. I was very excited before in meeting him but not anymore, i also supported him when he had rough times and i think he can't seem to remember that, i didn't reply to his last text from 19/08 but believe me am not playing games i just feel happier without him, i used to be very stressed when i text him and my heart was always beating, now my mental health is better and at the same time i hate ghosting others i feel guilty about it and I don't know what to do anymore. He texted today "how are you?" and i started to cry. Am not okay and I don't know.. Should i reply to him or just leave it?
Is it okay that I ghosted an online friend cause its better for my mental health?
Post Opinion