Being alone verses being lonely are two different things. Some value alone time but they aren't loveless or antisocial. Others may be around people but cannot relate to them, hence, they feel disconnected and lonely.
Being alone with our thoughts is a spiritual experience in itself. Often its a phase in life that compels us to embrace it.. gives us the strength and courage to love being alone.
Everyone experiences a phase of loneliness. There may be feelings of despair, frustration or sadness. But when we look back, that phase although was challenging, came with blessings.
It is a time we reflect back on that allowed us to grow both spiritually and emotionally. You will never forget those moments you sat alone in crowded places feeling lost, moments you smiled at your children but with pain on the inside, moments you wanted someone to know what you were going through but couldn't.
But when Allah (swt) changes our state and pieces of our puzzle begin to come together, we realize the gift that was given to us in the darkest of times.
Perhaps the wisdom behind this phase was for us to find Allah. Once we experience this closeness, its addictive. We crave the alone time to decompress and for the spiritual calmness.
We learn how to reflect and be honest with ourselves. We discover the ability to "chat" with the almighty on a daily basis through our thoughts. Its a unique gift.
"In Islam, there is a balance between solitary and communal acts of worship. For example, some prayers are done communally like Friday, Eid, and funeral prayers. However, extra prayers like tahajjud, istikharah, and nawaafil are best done individually. There is a place and time for being alone, and a time for being with others. Islam teaches us this balance" -Juli Herman