Loneliness and being alone are two completely different things.
Lonely people tend to have low opinions about themselves. They may think as themselves as stupid, unpleasant, not worth of anything and unable to do anything right.
When you feel lonely the essence is the feeling of being alone. Compassion. Its about the hours we get in each other's precense. People we've been able to know all our lives or people we've just met.