Having had some bad depression and anxiety for over a year, I have tried to do some mindfulness, and I couldn't do it. It didn't have a good effect on me, although maybe I have not practiced it long enough.

However, zazen (zen meditation) saved my life. After a few months of dedicated practice my mental wellbeing was better than ever. I practiced a lot, and on top of doing formal zazen at some 1h - 2h per day, I tried to carry on the practice in physical daily activities like walking, in the gym, doing house work and so on. This is not to say it was easy, but I had nothing to lose basically. I didn't know if it would help me or worsen my condition, I just took a leap of faith. And like I said, just after a few months I have started to experience good effects, I was doing zazen like I had a gun to my head, I either solve these issues or my life is over. However after some 6 months, when my problems disappeared I got sloppy with the practice and the problems soon re-appeared, and when I re-started my practice, I was cocky and delusional about it.

It took me another year to figure this out, but since then things are pretty stable. If I ever get bad anxiety, I can eliminate in some 20 minutes, but it just happens less and less often. If I start feeling depressed, or have depressive thoughts - I have basically a hardwired reaction to cut that off - it's like what I was doing was automated (have shitty thoughts -> focus on zazen and stop thinking, absorb the pain). And that too, happens less and less often. And of course, I still do zazen 1h every day, and try to stay present and engaged in daily activities and cut any useless mind wandering. It's nowhere near perfect and I have a lot of work to do, but anxiety and depression is not something I have to bother with anymore, and I'm very thankful for that and feel like I don't have the right to complain about anything.

The reasoning for why it worked so well - I think - is pretty simple. The problems I had with depression and anxiety were problems with my physiology and nervous system alignment. Being a programmer, I spent a lot of time in the intellectual world, eventually I got locked in and imprisoned in my head. I didn't have a sharp perception of the outside, everything had to first go and be filtered by the thinking mind, I was in a fog and I was kinda dead in the body. And my thinking mind was running wild, I think I have had some sort of OCD as well. This was a pretty low level of existence and this state of things gives plenty of room to welcome anxiety and depression. I also started to get somewhat socially awkward, which further contributed to the depression and it was on overall downward spiral.

Now with zazen I could fight back. I could cool off the thinking mind effectively, and it didn't take long to start seeing beyond the fog. With this I also could develop basic focus abilities, so I could further train my physiology. Little by little, I could unlock more and more of "the nervous system real estate", took control and feel of my body, and that eventually improved my ability to feel emotions.

Be aware - there are risks. My practice wasn't all flowers, there is such a thing in zen called "makyo" which are hallucinary sesnsations. Like I said, I had nothing to lose, and just took my chances despite fear. I had experienced a bit of makyo, but it was nothing that bad. The important thing in zen practice is to have faith in the long-term view and allow short term pain. For me the most dangerous thing was trying to interpret zen intellectually, which I have did to some extent, and the result was that my practice was broken - I was thinking I was practicing rather than actually practicing - it also has caused a worse comeback of depression - trying to interpret some of the zen teachings intellectually contribute to that 'life pain' thing, at least it did for me. So there could be some risks of course, just like with any unconventional way to do things, but the journey, the lessons and the long term reward could be well worth it.

If you are interested, check "3 Pillars of Zen". There are detailed information on how to practice. Also be aware of some of the esoteric stuff and try to not take it too seriously. And the kind of zazen I would recommend is the : counting of breaths -> observing breaths -> shikantaza rather than zazen with a koan.