That is part of the beauty of all literature. You discover that your longings are universal longings, that you're not lonely and isolated from anyone. You belong.
Our planet is a lonely speck in the great enveloping cosmic dark. In our obscurity, in all this vastness, there is no hint that help will come from elsewhere to save us from ourselves.
Often a man wishes to be alone and a girl wishes to be alone too and if they love each other they are jealous of that in each other, but I can truly say we never felt that. We could feel alone when we were together, alone against the others. But we were never lonely and never afraid when we were together.
Distrust brings frustration and fear. So therefore, the lonely feeling automatically come. So, lonely feeling is not creation of environment, but creation of your own mental attitude.
He was resentful against all those in authority over him, and this, combined with a lazy indifference toward his work, exasperated every master in school. He grew discouraged and imagined himself a pariah; took to sulking in corners and reading after lights. With a dread of being alone he attached a few friends, but since they were not among the elite of the school, he used them simply as mirrors of himself, audiences before which he might do that posing absolutely essential to him. He was unbearably lonely, desperately unhappy.