Why can’t I leave him alone..?

We’ve been broken up for 7 mo we have a child together & even tho I don’t want to be with him I miss him..? I miss him just being there and even tho he’s so rude to me when we talk I miss him ☹️ I’ve been crying randomly lately thinking about him how can I stop doing this to myself I feel like I’m in a spell he’s completely fine and tells me to get over it but even tho I don’t want to be with him I do text and call him a lot and it’s hard for me to stop