I have been very depressed for much of the last ... geez... probably since I was 14, so 13 years. Nearly half my life. Some of it was due to abuse when I was young. I got help for that during high school. But some of it was also because of just feeling so hopelessly out of place in my own skin. I have found that since I have fully accepted myself as being trans, started therapy, came out to a few people, and am taking small
small steps to start transitioning (I shaved my legs and paint my toe nails when I get the chance... which reminds me I need to re-paint them) ... I feel a whole lot better than I can ever remember feeling already.
I still have a strong sense of dysphoria ... but it's nice to just know that there is something I can do about it and that I
am doing something about it. So for me, I am definitely depressed because I'm trans and not the other way around.
As for mid life crisis talk ... I kinda think that a mid life crisis isn't a real thing, and probably isn't even a crisis for a lot of people. I suspect what happens is as a person gets older, they realize that this really is their life. Why should someone live it unhappily? People also get older and realize two things usually.
First: most people don't actually notice you. So ... why are you worried about a bunch of people you don't know on the street getting scared or freaking out about how you look or that you're trans? The reality is that, unless you're famous or really stand out ... most people simply aren't going to give you a second glance. So ... you may as well do as you want if it makes you happy.
And second: People kinda reach that age where instead of panicking over what everyone else thinks ... they instead start to think "eh .... Let's see what happens!"

So when someone goes through what other people see as a mid life crisis ... what they're really seeing is something that person has always wanted/loved/felt like come forward. It seems sudden to those who didn't know about it, and very abrupt. But the reality is, it's something that may have been on that person's mind for decades, maybe their entire life, and to them it's not abrupt at all and makes perfect sense and was rationally thought out.
That's not a crisis. That, my friends ... is sweet
sweet victory.