Did I do the right thing reacting towards my ex? Advice please?

Hey guys I guess I just need encouragement. Please kind words only if possible. I don't even know where to start. I work w/ an ex boyfriend that blows hot and cold. Umm... he is just bad news. For example, I told him or asked him if he could give me space. And of course right when I come in he's RIGHT by my desk (he was at my colleagues desk right next to mines). BUT he'll have a stupid attitude towards me. Like he wants me to see him but wants to be an ahole towards me at the same time. Long story short, I sent him a text (I have him blocked as well) that I don't appreciate his behavior and that he let me down. Then less than 30 minutes later he comes to my desk asking about an order I already discussed wit his uncle about (his uncle works w/ us) and given the warehouse all the paperwork. So I snapped at him like bad and he just laughed and walked away like shaking his head. Now I feel really bad but he's a jerk and I couldn't help it. I almost feel like crying but I also feel I NEEDED to react that way so he'll know how serious I am about this. To me, its like the situation doesn't bother him and since it doesn't bother him he could care less about my feelings. Selfishness. I guess I'm just looking for words of encouragement that I did the right thing. This guy pursued me for MONTHS and I always told him no cuz we work together but finally gave in cuz I thought he really cared about me. He just wanted to play w/ my heart and now I'm stuck working w/ him. Thanks in advance.
Did I do the right thing reacting towards my ex? Advice please?
Add Opinion