This is a weird edge case, for sure. Seems like it's still far from understood. It could be any combination of psychosomatic issues, trauma triggering, lifestyle factors, and undiagnosed organic issues, as not all diagnosticians are great when it comes to edge cases.

Just a thought to those who assume the brain diagnostics would have shown any seizures: There is something called "cognitive kindling." If a particular type and duration of mental activity can induce partial seizures, to confirm this any functional diagnostics (such as an EEG or fMRI) may have to be run during that type (and duration) of cognitive activity.

I've felt something similar to what the poster described -- subjectively or phenomenologically. It began to effect me in the 1990s at QCOM, where I did mostly troubleshooting of embedded real-time systems. I tried to get a leave of absence but (despite having won two performance awards, each with additional stock options) my last (new) manager accused me of being lazy, so, rather than keep getting paid to show up and produce nothing of value (despite racking my brain) I quit. I wanted to leave before I jeopardized my good reputation, and given that the scope of my project was months, it could have been many months before I'd have received my first performance review below 3 (of 5).

Thankfully, the last 50% of my initial set of QCOM employee stock options, plus 20% and 40% of my second two sets, vested near QCOM's all-time peak in 1999-2000. Thanks to that windfall, I was able to self-fund a deep dive into the peer-reviewed medical literature (because my own MD-PhD internist challenged me to do so*), see doctors who are good enough not to need to deal with insurance companies, and pay out of pocket for their diagnostics and treatments.

(*Even though medicine does generate so much research that reading the research and making sense of it might need to be partially crowdsourced to the set of people with sufficient means, motive (pain point) and opportunity -- which is what I had -- even so, society, please do not rely on the edge cases of partially-disabled, semi independently wealthy engineers to come up with our own solutions.)

Unfortunately, I don't take fools lightly, and I quickly label as fools non-Bayesian thinkers who can't see zebras because horses are so much more prevalent -- and make false assumptions about my history, motivations, and inner life. So I steered clear of perfunctory "show up in a white coat and get paid well" types who perform "nobody ever got fired for buying IBM" standard of insurer-covered care. I ended up hiring mostly "alternative" doctors, and while their treatments (and ones I found myself, including illegal ones) were the ones that ended up helping me, their diagnoses are not useful in proving anything to conventional doctors nor to the government.

Thanks to QCOM stock options and then profits on precious metals after the 2008 crash, plus my wife's support and a few entry-level jobs, I did not apply for Disability benefits until many years later. I was not approved for benefits, despite my psychiatric practitioner and case manager recommending it (for chronic PTSD, finally diagnosed after I suggested it myself), and an acquaintance who works for SSDI (US government Disability insurance) saying I'm "as disabled as most who qualify." Based on my experience, despite being a former Libertarian I believe the US social safety net has huge holes.

Eventually I found some relief with a keto-ish diet and then, since spring 2018, microdosing LSD or psilocybin in the morning. Cannabis or delta-8 THC I sometimes also use in a normal (non-micro) recreational dose at bedtime, which seems to prevent subsequent days of effort from accumulating toward a burnout. This allows me to work a normal entry-level job, as long as there's no drug screen. For the latter, microdosing LSD or psilocybin are more practical (though more-often fully-illegal) because they are less likely to be detected by standard drug screens ordered by current or prospective employers.

By the way, though I have been substitute teaching since October 2016, recently held a full-time factory job with mandatory overtime (48 to 56 hours per week) for 13 months (with a promotion to Electrician at $20/hr), and recently landed a full-time WFH customer service job to start May 17, this requires me to stay within 2.5 hours drive of the office, and I am looking for fully-remote work that pays a bit better than this $15.50/hour. I can do customer service just fine, and given my history in software development (mostly embedded, mostly the 5 years at QCOM, with degree in electrical and computer engineering) I think I could earn a premium doing a similar role, or perhaps some kind of technical writing, in a more specialized technical or scientific niche. (Along the way I did 40% of a Master of Public Health and later did most of Coursera/JHU data science course.)

If anyone has job or career ideas for me (who still has been unable to do software engineering beyond the hobby level without burnout) I welcome them at (see my profile for email adress).