I think loneliness can be a vicious cycle when combined with alcoholism. We drink because we're lonely and because we're drunk, we're not the nicest people to be around, which pushes people away.
I was lonely, too, but I had to learn how to get comfortable with myself. I've always been really shy, but I have small groups of friends who like me for who I am now. I can still be lonely sometimes, but it doesn't drive me to drink.
I suspect you have a good friend who cares about you--why else would they reach out to you?
It sounds like you're looking for a reason that "causes" your drinking. But at this point, maybe the solution is for looking for a way to stop? I still don't know why I drank the way I did, except that I had an addiction to alcohol. Everything is much better now that I've quit.
I suspect the same will be for you, too.
All the best.