Leetcode is a great way to polish your skills. When I was your age, I read programming books and made projects I cared about, it’s turned out very well.
I’ve helped a few others learn programming, practice and working on any project at all always help more than anything.
Learn to redirect, wear a bracelet or similar physical reminder of a specific thing you like, when you experience the thoughts you want to avoid, redirect and focus on the things you like
Change your environment, identify triggers that push you toward depression and avoid them. Some literally cannot be avoided, and some situations are impossible to escape, in those cases accept the associated negativity and redirect
Find people who have the attitudes and feelings you want to emulate and spend time with them, we are social and learn much from our peers
Ingest media that aligns with your desired world view, avoid tragedies, horror movies, gore, popular doom news media, etc. This will force you into an echo chamber but it is a popular coping technique
Most important you are your own person, write down how you feel and what triggered those emotions every day. You can’t really know if you’re improving if you don’t have a record