There are many temporary solutions to get rid of it, some of them are; a walk in the city footpath, buying out some tasty food, meeting someone in person and talking to them etc.
The permanent solution is to remove all those things from your life that exaggerate the alone feeling in you. Let me give a very practical example:
Suppose you are feeling blue and lonely. So what is the next thing you do ? You log in to Facebook and start scrolling through the newsfeed. Why you do that ? Because it is an easier option over doing anything else. YOU HAVE TO STOP DOING THAT. Instead, you have to do the right thing. But how do you discover the right thing ? Again, let me answer this question by giving an example of my own scenario here.
When an air of melancholy surrounds me, I have a habit of browsing Facebook. Facebook makes me feel more sad and tiring. Sad, because my newsfeed is often filled with people posting about how enjoyable their life is. I am sure that the same happens to you.
But, somewhere my mind silently knows what to do to make myself feel right. My mind tells me that if I start doing the pending assignment on Data Structures now, I will feel good because I have been planning to do that since last 2 weeks. I also know that completing the work that my cousin gave me on improving the design of a website will give me productive happiness.
The point is to eliminate the feeling of guilt in ourself. That feeling which comes in when we do not do what we should be doing. Reading that article by a Google Engineer, learning to use Excel (we all planned it one day 🙂 ) and there can be so many examples depending on what you planned.
A writer on Quora wrote
Your mind will play tricks. It will tell you are useless piece of crap. Sometimes your friends and your family will think the same. Sometimes they will tell it to your face. But you just keep going. May be cry a bit. Eat a ice cream, go for a movie or a walk (cheaper) and then sit on your study table finishing the part you had decided for the day.
1. Restrict use of Facebook to particular time slot to feel mentally more fresh You can read here to learn how to do that
2. Make sure that Facebook newsfeed reflects your thought. Know to filter your facebook newsfeed
3. Do not be sexually desperate when you are lonely. You will end up killing your reputation in front of lots of people
5. Make your mind work out when you feel lonely. Read good books if you do not want to study your academic stuff. See point 6 for list of books.
6. Amazing Books That Are Worth Buying To Feel Inspired
The most difficult task is to start and focus on the work you want to do. But trust me when I say this: When you will work on things that you should be working on even for 30 minutes, a feeling of mental satisfaction will surround you. You have to remain consistent on 30 minutes schedule for a week and increase the 30 minutes to 45, then 60 and so on. Good habits takes time to sink in. I can write about all ways to get started productively and list out all the phone apps that will help you remain productive. But not all will read this article till the end. If you loved this article and want to discuss further mail me at firstname.lastname@example.org. I would be so happy to help 🙂