Listen buddy.
The pain from loneliness comes and it goes. It's not a perpetual pain that prongs your brain with feelbadfeels. No, it's triggered by thoughts and memories.
So what you have to do is learn how to first avoid those memories and triggers, then you have to learn how to cope with the pain once those feels inevitably show up again.
Reading in itself is a great way to escape the badfeels, but if you decide to use books as an escape ladder, please, for your mental sake, don't read depressing books about depressing people. You're already depressed. Read something happy or inspiring. Or, don't read at all. You don't need to constantly feed these badfeels with more badfeels.
Instead
I suggest consistent journaling. Start small, maybe a page every morning. Then once that becomes a habit bump it to two pages, then three, four, ect. You need to get in tune with your thoughts and analyze why you feel the way you do. No one is going to read this but you, so be truthful with yourself. If you think your mentally stunted because your mother is a dumb cunt who never bought you the sugary cereal you wanted as a kid - write that down - that is how you feel and that is your perceived reality of your current situation. Nothing is off limits, no one is going to read this but you, so let your inner insane man run wild all over the page. You will feel better I promise you.
Once you've built up a couple months worth of thoughts in this notebook spend a couple days reading the entries. Take notes on common things you blame for your failures and setbacks. This is crucial because we need to understand what exactly is bothering us. Where are we putting the blame for our problems. Often times it's not ourselves and we are the root of most of our problems and the times we aren't the root of those problems - we still are - I say this because we are not reacting to the problems of our reality in a rational manner that is conducive to our mental health.
Also start working out. When you feel bad thoughts, give your body something to really feel bad about. Do push ups, go for a bike ride, pull ups, just anything physical that you can do till exhaustion. You're still an animal. The body and mind are built not for logic or reasoning, despite what you may think. We are savages. So move your body like a savage. Your brain can't focus on the bad shit when you're using it for what it was built for... physical activity.
Just my two cents.
Reading is good for the mind. But exercise and self-reflection are even better. Most of the "mind-blowing" ideas you read can be found on your own once you start you own personal inquiry about yourself and the world you live in.