One of the most positive and transformative methods for transforming feelings of separation into feelings of connection is the practice of metta, or loving kindness, or indeed any practice in which you send blessings or good wishes to others.
There's a variation that I sometimes do when I'm feeling fearful or sad, and it works just as well for loneliness.
Love Your Loneliness
Begin by feeling your own loneliness. Without resistance, tune into it. Then, connect with your breath, and with each one, send these thoughts to yourself:
Breathing in, think, "May I be happy.
Breathing out, ask, "May I feel loved."
Breathing in, send forth "May my loneliness be healed."
Breathing out, ask, "May I be at peace."
Next imagine other people in the world who might be feeling lonely at this moment, people you love, and those you don't know (lonely children, homeless and ill people, people breaking up with their partners, people in prison, and anyone else who comes to mind). With the breath, send out the same loving thoughts to them: "May you be happy. May you feel loved. May your suffering be healed. May you be at peace."
Finally, take a moment to send these thoughts to every one in the world. "May all beings be happy. May all beings feel loved. May the loneliness of all beings be healed. May all beings be at peace."
Anyone who does this famous and powerful practice will know how it can soften and change your own heart. When you consciously send blessings to others, especially in this systematic fashion, it forges your connections not just to the people you know, but to all the beings you include in your well wishing. And then, sneaking in with the breath, comes the realization of your unbreakable connectedness. You can't be lonely when your hearts are joined, even for a moment, to the hearts of all.
The Power of Solitude
When the universe forces you to be alone—whether its in physical solitude or in the solitude that arises when you're in a strange city or a failing relationship or around people who don't support you—take it as an opportunity to engage your (sad, alienating) loneliness and turn it into (powerful, transformative) solitude.
Do this by choosing to spend some time alone. You can practice aloneness for half an hour; if you've got more experience try several hours, a day, or longer. Whatever the length, commit yourself to a set amount of time.
To engage aloneness, resist turning on the TV or radio, calling a friend, doing your nails, working on the computer, reading, or any of the other distractions you use to keep from being alone with yourself. You can do asana, especially restoratives that help you relax and release. Sleep is off-limits, though. Meditation and self-inquiry or contemplation are perfect ways to use this time.
When you're starting to explore aloneness, you might want to create a program for your alone time, including some asana, some contemplation, and some meditation. Keep a journal with you, and write in it when you have the urge.
Don't get too attached to your program, however; you don't want to make it another "activity." It's there to give you the chance to unwind. Optimally, you'll end by just being with yourself.
Begin by making an intention. It could go something like this:
"I'll spend (time allotted) alone with myself, consciously exploring the experience, and making space for insight and peace to arise."
Along with meditation and asana, you might want to spend some time exploring an issue or question that is "up" for you. Let's suppose that you want to work with loneliness.
You could start by silently asking yourself the question: "Where does my loneliness come from?" or just work with the words "My feeling of loneliness."
Holding the words in your mind, notice the feelings, images, and memories that arise. Write down anything that you want to record about this. The best way to do this inquiry is with gentle curiosity.
Now, take the inquiry into what is sometimes called the Contemplative Space. Close your eyes, focus on your breath, and sit for a few moments, centering yourself. During this process, if thoughts arise, label it "Thought" and let it go.
When you feel relatively centered, ask this question, feeling that you are asking it of your deep intuitive self: "What can you tell me about loneliness and its antidote?"
Then write in your journal, without censoring, whatever comes up. The words that arise may not be so different than the words that came from your earlier inquiry. But often, you'll find that when you take the inquiry into the contemplative space, insights arise that are quite surprising.
You can use this process with any question or decision you might have. And as you do, you should notice how much insight your soul is capable of giving you when you allow yourself the time to engage the healing spaciousness of solitude.