Lonliness makes us more stronger. So instead of thinking it is a bad feeling try to think that this is an opportunity given by God to make me more stronger. If we are ready to face any challenge that life throws at us.. then nobody can stop us.
Try to challenge that feeling and keep yourself occupied with things that made you feel good earlier. Acknowledge your present feeling.