Acknowledge that you feel lonely
Realizing what you're going through is the first step in moving forward. Most people attempt to ignore their feelings of loneliness or believe they are just anxious or depressed. Many people are ashamed to say they're lonely because they connect the feeling with social isolation and being different.
You must accept that sometimes, everyone experiences loneliness. Furthermore, being lonely is not a sign of weakness or of being failure. You're still a person, that's all. According to studies, labeling your emotions can reduce their intensity of them. Therefore, just giving your loneliness a name might make it easier for your brain to understand how you're feeling and quickly make you feel a bit less lonely.