Hi James!
Thank you so much for commenting here! I'm happy to share my own personal insight on Mental Health and provide you with some tips.
1) Take a BREAK. I know it's hard to do, even I find myself struggling to get away from the computer some days. I started to commit to a challenge on Twitter. I came up with a hashtag called #100DaysOfMove. The reason why, is because myself and other developers are committing time and space away from our screens whenever we can and documenting it day by day. The accountability really helps, and getting outside, or a mental break from non-stop code can do wonders for your mental health
2) Not too sure if this will relate to you, but I find a lot of people comparing themselves to others. If you begin to compare yourself to another developer and their success, STOP! That's again time for a break. Maybe not from coding, but from social media. It's okay to turn your notifications off and focus on what you need to do. Folks with mental health issues tend to tell themselves that "they're not good enough" as it is. When seeing others on social media, it could damage how you're feeling and trigger some anxiety. Practice some mindfulness, and self-love talk. Remind yourself that you're an amazing person, and you don't need to compare yourself to someone else.
3) Talk to people about it! Myself and a few other amazing developers are currently working on a Web Application to help with mental health. We're also creating a Twitter account to create a community, and link people to a discord or slack channel. This way, folks can talk to each other anytime, anywhere. It's always easier when you have someone else who can understand you, but before that's ready you can find me on twitter: twitter.com/rothcoder . Once we launch, I'll post about it there! Also, not everyone around you will understand, but you can try to help them understand. Explain what you're going through, teach them about your mental health. As hard as it is for us, it's hard for our partners, friends and family too.
I hope this has helped you! Thanks again for your question James. I look forward to seeing you around on Twitter, and hopefully in our mental health group (soon)!