Hey! I know this feeling well. I'm bipolar 2 + ADHD and over the past few years I've drifted more heavily into the depression side. A few thoughts to share:

1) Definitely consider meds. They are not a true answer in a sense but they help you get back to homeostasis so you can rebuild yourself. Current regiment for me is Welbutrin 300mg (mood stabilizer, anxiety), Adderal 15mg XR (ADHD), Lamotrigine (bipolar).

2) Therapy is a recent change for me but I am finding it helpful. With my type A personality, I've decided that a cognitive behavioral therapist made sense to me as its more action oriented than just talking w/ someone. We setup tangible todos, monitor week to week, and spend time talking. One interesting thing in particular is working on coping methods on issues that don't have an immediate solution. Where I place my energy effectively makes a big difference.

3) As a manager, I have to say that a poor relationship w/ a manager is draining to say the least. A friend at Netflix recently made a major shift from a UI team to API over this. Have you looked into making a move internally or considered leaving? Being at FAANG, you have high potential to make a move at least horizontally.

4) It's helpful to identify triggers that give you feelings of depression or other bad feelings. It could be as simple as staying away from caffeine or lowering interactions with a particular person. Like your manager.

5) Easier said than done but this isn't an uncommon feeling for many. You're surrounded by talented people so imposter syndrome is not uncommon. I will bet 100% that you are better than you may realize.

6a) This one used to hurt to admit but not anymore. I am an average engineer at best. You start to realize later than it doesn't make as much of a difference as you'd think. Can you solve problems? Can you get to the finish line on your work and deliver consistently? Are you surrounded by people who can support you in growth? Your solutions don't have to be perfect as long as the support system and processes are there to create bumpers around you. Maybe you want to get to staff engineer but that is a decision and path you have to figure out. If you truly want to go deep, you're going to have to practice and grow. There is so many other options outside of that though.

6b) It can be tough to get to the finish line. Personally I've found that I need to prioritize and get my TODO list down to the most essential and dedicate my time to nothing but one activity at a time. With the addition of ADHD I bounce around a lot and fall into the same issue. Try to force your time into one activity in spurts and don't move onto until you get to the end. (Spurts are important so you don't burn out as you're already working to get to completion and it has been difficult.)

7) Take a break! Go burn some PTO. Get away from the computer.

My takeaway is that your environment is where this is most definitely stemming from. I highly suggest looking at a move. Do it for yourself. You shouldn't have to feel like this. Hope this helps in some way. I wish you the all the best. It can get better.

ps Don't let the stigma of mental health issues drive you away from getting help. The industry needs to be so much better about this.