What do you do when you're sad?
I bet "be nice to other people" isn't on your list. Calling a friend to ask for attention might be, but it's not the same.
My therapist recommended that if I ever get the urge and I have no one to turn to, I should send out nice messages or do something altruistic before I act on any urges.
You send out a message like "hey, pretty eyes" without expecting a response. And for some reason, doing that makes you happier, because you know someone else will be happier when they receive it.
When I've done a big gesture, I felt such a surge of love that it made me feel at peace with myself.
Try it! And let me know what you think.