Crying about men

What to do If you know the man is not worth your tears but you can’t stop crying about him?

He told me he loves me but he wouldn’t break up with his girlfriend. I don’t talk to him anymore. He was one of my best friends.