Many people mix up the concept of being lonely and that of being alone. People often think that if you're alone, you must not have friends or family to spend your time with. You must be a total loner with a cat (or 20) sitting at home impatiently awaiting your arrival. How could you actually choose to be with no one other than yourself?
Well, being by yourself, all alone, with nothing but your own thoughts doesn't have to actually feel lonely. Being lonely is when you're alone, but feel like you need people around you or there's a void. It's OK if you're dependent sometimes or just enjoy the company of others, but there are going to be times when no one is around. Sometimes you may have to grab a bite to eat by yourself or you might go to see that new movie that none of your friends are interested in, but that's just fine.
Think of yourself as another person. I know this sounds weird, but hear me out. You'd want to spend time with an old friend or new friend in order to get to know them better. Hanging out in a group can be fun, but those one-on-one conversations and late night heart-to-hearts bring the both of you closer together. These moments, no matter how long, are some of the most memorable and are what build your relationship. Spending time with them really gives you a chance to get to know this person inside and out.
So, back to you. Spend time alone. You can read a book, write in a journal, go for a walk or maybe even check out the new Thai restaurant you've been eyeing by your work. Just be alone with your thoughts. Figure out how your brain works, what you like or don't like, what your goals are, what you're afraid of, and what you're confident in. Think about your past and what's bothering you, how you can let it go, and what you can look forward to. What do you want people to know about you?
After that, spend time looking at yourself in the mirror, clothed or not. I'm not teaching you how to be a narcissist, I promise. Some people, probably many people, have trouble looking at themselves in the mirror. Many people don't like what they see and get upset about it, nevermind looking at themselves completely naked. It's important to like yourself for who you are. You were given a body, and you should own it. Sure, you don't have a thigh gap, in fact, your thighs rub together every time you walk. Maybe your stomach juts out, or you just have too many freckles and you think they're ugly. Whatever it may be, accept that part of yourself and move on. This doesn't happen overnight, and it's not easy by any means, but like most things, it will get easier with practice.
When you've done this, you'll know who you are, maybe not completely, but you'll definitely have a better sense of self. You'll start to know how you stand out from the crowd and what makes you, you. Take this as a work in progress. You are constantly experiencing new journeys and seizing new opportunities, so give yourself time to get to know you as you grow. It may take time to catch up with yourself after a month of even a few days, but don't let that friendship die. Listen to your body and what it's telling you. Be self-aware. I guarantee this will help your relationship with not only yourself, of course, but with friends, family and lovers. You're enough, so start acting like it and be alone every now and then, you'll forget what lonliness ever felt like.