It is really hard, and it takes time
I found that sometimes my art helped in moments like that. I would set myself a particular goal, to draw something, then once I got started I could easily lose myself for a while. When I lived alone and felt so lonely I filled many evenings working on a drawing before. The hours flew by. And it was lovely to have a final product at the end too
Do you have any hobbies? Is there anything new you maybe fancy trying? With so many resources open to us now online there is lots of guidance around for learning new things. Perhaps there's a class or group you could try, which would help build towards finding a purpose for those moments when we feel a bit adrift.
I also recommend Futurelearn, it's by the open university and is full of free courses supplied by universities. Perhaps there may be something you find of interest there, which could be a starting point of something or an achievement about learning about a topic. It's online, you fit it in when convenient for you and there's the option to interact/comment with other learners too
Xx