Try abstaining from PMO carefully and don't look facebook, instagram. If you don't see stupid posts from people about their bf/gf or partner etc and how much they are enjoying yo will feel better. Connect with real people who really wants you like your family. But do remember not to use high stimulating things like drugs, pmo, binging on your favorite tv series etc. Do dopamine detox that thing is real. Start enjoying small things and keep working on whatever you do. Most important thing is don't see stories on social media. Stop giving shit what other things do what you think is correct and don't struggle for people approval. Have a goal, without a goal everything seems futile and you will turn back to PMO. Rather than seeing couples are enjoying lockdown in covid. Think about all the hard work doctors make. Be valuable by giving back to society. I am sure loneliness will go away.