As a kid - I've put two really long (sweater sewing) needles into power outlet.
I guess luckily I hit earth/ground with one of them - since we had differential (RCD) circuit breaker(s) installed it just shut off electricity in the apartment.
If I managed to hit both into real live and neutral - the differential breaker wouldn't have done a thing, and I wouldn't be typing this.
I guess you haven't had chance to join a conference call (Zoom, BlueJeans, Hangouts ...) where someone has a fan running in their relative vicinity?
At first I also didn't know why is one of colleagues sounding "weird" - never would've thought they had their fan running, until one product manager asked "Hey X, do you have a fan running nearby?"
Based on (recent & ongoing) personal experience (which luckily includes not having to work, still getting full salary and therapy/shrink) and learning from that - longer break is obviously good, though likely not enough in longer term.
Exactly that combination of "you care deeply about the area you are working in" and "hard to turn off" (even with less of "very ambitious company") - will eventually bring you back to the same situation, unless you change habits/approach/etc.
Instead of focusing/pushing for "not tying so much of myself to my work/current company" and "motivation" - perhaps it's better to focus on training yourself when and "how to turn off" and not slowly drift towards old habits?
And I think I know what you mean by "depression hits pretty hard and you stop doing things for yourself due to lack of joy/seeing the point in doing anything". Though in my case I realized that it originally started from myself feeling guilt where I was nagging to myself how I can't do whatever fun thing while there was some other work thing/project where I thought I'm behind.
So slowly over time that guilt made fun things less fun, and combined with stress started to skew perception of how productive I am, and how long something will/should take ...etc. Eventually that skewed perception spilled from work to personal life - so for those things/projects that were still at least somewhat fun/enjoyable I also started to be annoyed by them taking longer than what I thought they should take.
So here I am. Experienced software engineer that is currently on sick/burnout leave, where I'm not only receiving full salary, but burnout being work related illness/impairment - company is covering (at least a dozen of) psychiatrist sessions.
I can't imagine moving countries/continents on top of being burned out would be a good idea.
Though you and others that mentioned being prone to recurrence should seriously consider moving somewhere else. Like one of countries in Europe where employers are responsible for employee well being, putting in effort on reintegration, re-training professions ...etc.
---
On top of "there is nothing worse than the realization of the futility in any struggle to either escape or improve. The knowledge that your output has dropped, the feeling that it's your fault".
At least for me the case was that there was also months/years long period of me thinking along the lines of "This shit is almost nothing compared to all the hard things I've been though in my life" (things spending summer break mixing concrete by hand with shovel to earn/save enough money for 10 or 15 years old computer, or living though a war ...etc)".
So for those months/years I was trying (and at various times seemingly pulling off) to keep the level of my output by trying harder/smarter/better and lot's of good old burning of midnight oil ever longer.
That is until part about being ever more annoyed about lack of output despite extra effort/hours/etc, which itself makes output kind of recursively worse - I got to a point where (with some encouragement from increasingly more and more physical symptoms that start like headache, bad stomach ...) I just couldn't keep doing that anymore.
And basically every other thing/hobby/learning/etc that was previously fun/relaxing/entertaining/interesting (including playing with my kids) - stopped being fun/relaxing/entertaining/interesting/etc somewhere along the way.
While you might be right about "Stuck in a job" and "with nobody interested in helping you because they are annoyed about your lack of output. There are no doorhandles on the inside of this washing machine."...
Also keep in mind that under burnout/stress your thinking/perception/evaluation/etc is severely impaired/limited and generally skewed towards negative.
So instead of just wondering/thinking and meowing somewhere where others might not hear/notice you, or notice your but not realize what your meow is - I would really (in scientific/objective sense) check if you're "stuck in a job with nobody interested in helping you".
Perhaps clearly/officially ask for (hopefully paid) sick leave due to stress/burnout?
OK I've seen/been at places where even that might be enough to get one fired. And sure there might be reasons that you can't risk that.
Though again - actually do some research and compile a plan of "What else could I do to cover rent/food/etc until there's something better?" (cliche example of waiting tables is not working great during Covid-19, though many people are painting/renovating/extending their homes, food/groceries delivery services need more people ...).
Since if you're completely right about everything including how much are others "annoyed about your lack of output" - you'll probably need to look for another job soon?
---
PS. Although it's a throw away account because regularly used one often gives too many details about me and employer - I'll keep an eye on this thread and respond with same account for a while.
I guess luckily I hit earth/ground with one of them - since we had differential (RCD) circuit breaker(s) installed it just shut off electricity in the apartment.
If I managed to hit both into real live and neutral - the differential breaker wouldn't have done a thing, and I wouldn't be typing this.