I usually sleep earlier. That's the best indication that I'm feeling alone or bad, lol.. Sleep earlier = feel bad, sad, and/or alone Sleep earlier = too tired (in some cases, but it's rare)
Listening to an upbeat song usually makes the loneliness fade away, listening to a more touching song makes me feel better too.
When I feel lonely I call a friend and go out. Or I go to gym. After 2 hours out I coming home a better person.