Hi @Hyperballad ,
Thank you for sharing your experience with mental health in the workplace. You absolutely aren't alone in your experience. It can be such a hard experience to be working with mental health issues however it's not impossible. I think @Daddymac made a great suggestion there with their chicken and egg pun about deciding whats most important and focusing on that.
A couple of different thoughts/ideas. Have you had a chance to speak with your manager/boss about how you are going? By having an honest chat about your mental health you may be able to discuss some accomodations to make the workplace easier for you. Just like physical health issue, accomodations can be made and mental health is health and just as important as physical health. It might be worth organising a meeting and before you head in writing up a list of accomodations that could help you be your best at work.
The other thought I had was potentially looking for work at a different company that does put an emphasis and care onto mental health and ensuring their employees are doing okay and taking care of their wellbeing. I know it's not ideal in the short term however in the long run when trying to balance health and a career it's important that those you are working with are on your side and supporting you so you can be your best for your work and your wellbeing.
I hope this gives you a couple of ideas of ways you can maybe shift things to make the workplace an easier place to be and to create a place where you're supported through your health in a way that allows you to progress in your career.