I’m struggling…

I was doing fine earlier today but all of the sudden I got a massive wave of sadness, loneliness and urge to text them. I said I would do NC but I really really want to talk to them. The urge to do it is driving me insane. What do I do?