When I was a child, I would lay awake at night, in retrospect it was anxiety and depression due to loneliness (only child, sheltered, private school with less than 10 kids).
What I did, without the knowledge or concept of anxiety and depression, was that I would let me thoughts run and I would use logic and reasoning to get through them.
"What if a kid makes fun of me for this and that?" "I would then do this", and then I would play out every single possible situation in my head on what the most common, worst, and best outcomes were.
A decade of doing that helped me.