Loneliness really is just nothing more than an idea, that produces an uncomfortable feeling. It can come whether you're alone in the woods, or in a crowd of people. Single or married. So it has nothing to do with being alone.
Most people crave attention (care) from others, in order to change their own thoughts about being alone (eg. no one or everyone loves me kinda thing. If no one cares about me I'm alone, if everyone cares, or understands, or whatever, I'm not alone). This is what drives people to seek out friends and spouses.
However, many people who mediate regularly, over time, once their minds have become very quiet - ie, they really just stop thinking in words, experience an overwhelming feeling of comfort, love, if you will, and love towards many people and things. Including themselves. They just feel alright. It's the antithesis of feeling alone, because you feel just fine, more than fine, on your own. This is very much how people can feel when they feel loved or 'not alone'.
So the direction is opposite than most people are used to. Rather than love and kindness coming from others towards us, making us feel less alone, positive feelings and thoughts emanate from us, out towards others and all things.
Being loved by and cared for and understood and accepted by others is great. It's truly wonderful. But not necessary, and in fact, when you find the love already in you, and it starts to fill you, and radiate out to others, others will love you.
And I'm talking about thoughts and feelings here, which create our perceptions of the world, not metaphysical mumbo jumbo. Nothing spiritual. But profound nonetheless. I'm talking about Zen. I'm talking about the Way.
You are not alone 😃