Some background:
From 2015 to 2020, after graduating, I worked as a developer for a company, where more or less always managed to do what was expected from me, and ended up being a reliable employee.
There were however some troubles on a personal/management level, because management did some nasty stuff. It took a heavy toll on the team mental health. I personally suffered from a burnout and insomnia. I never went to a doctor to seek help.
In 2020 the company went under because of the pandemic. After my 2 months notice, I found a new job and took it... To this day, 4 years later, I am leaving this company.
My Issue:
Basically, in this last company, I was facing some serious challenges for any task given to me. A part of that came from poor project management (globally acknowledged by my teammates), but I suspect that there is also something on my side, something I can't point out and I want to work out...
Noticing my "skill issue", I discussed with some teammates I was close with, asking for their opinion. I tried to apply their advice (main one was "You rush your work", although I always thought I was kinda slow), but it changed nothing.
Since October, I had new mental health issues and went to the point of thinking of quitting my job to take some time to rest, think about those issues, see some therapist, and get back into shape... but management acted before and fired me; I'm currently in my notice period and in sick leave for depression.
Now I'm trying to understand what was my issue with my skills, why I went from the reliable guy you could give anything to that unreliable guy you give only minor tasks because he fails everything... And most importantly, what steps can I take to avoid this from happening on future jobs.