why do i do it to myself?

I have been ok today,been at afriends all day and shes going through some crap with her husband so it kind of took my mind off my own feelings.But then i went on facebook and saw a comment from stbxs niece,just saying she was out with him and his sister but seeing his name my heart dropped.So like an idiot i text him to say glad he has a new job and hope it works out.no reply,what did i expect he has told me he has no feelings anymore but now im crying and i miss him.im so depressed again and i was doing so good.