According to the story in Genesis, after God had created the first human being, he commented, "it is not good for the man to be alone." (Genesis 2:18)
That is profound. Adam was in paradise; he had direct contact with God—and God still said that he was alone and that being in such a condition was not good. Until that moment, at each step of the creation narrative, after each creative event, we see the comment "it was good." But after creating a single human being, alone in paradise, even though he had God with him and could talk to God any time he chose, God said—for the first time ever—that something was NOT good.
When facing problems and when facing just life, whether good or bad, being alone is a horrible thing. The author of Ecclesiastes comments in the fourth chapter:
Again I saw something meaningless under the sun:
There was a man all alone;
he had neither son nor brother.
There was no end to his toil,
yet his eyes were not content with his wealth.
“For whom am I toiling,” he asked,
“and why am I depriving myself of enjoyment?”
This too is meaningless—
a miserable business!
Two are better than one,
because they have a good return for their work:
If one falls down,
his friend can help him up.
But pity the man who falls
and has no one to help him up!
Also, if two lie down together, they will keep warm.
But how can one keep warm alone? (Ecclesiastes 4:8-11)
Adam had God, but he needed Eve. Moses had God, but he needed Aaron and Hur to hold up his arms (Numbers 17:12).
We need people around us when we cry, we need people around us when something wonderful happens; we need to share our triumphs and disasters: we need to tell another person what is troubling us, or what has made us happy. It is not healthy, it is not good, to be alone. It is not good to have only God. God does not think he is enough for us. He thinks we need other humans around us. If other humans aren't around, he says that we are alone, even when we have him; God alone is not enough.
Those suffering from depression will often try to isolate themselves. If you suffer from depression, make an appointment to see your doctor. And fight the urge to be alone. Force yourself to be around your friends. They love you even if you don’t believe it. You’ll feel better when you aren’t alone.