I have been there too! I was also incapable of working afterwards. All the code was alien to me. Being in the office was a nightmare. I wanted shout and jump through the window! And seeing all the people whose mismanagement let me into this bad post burnout situation was even worse. Corona, my savior, came to me and office was closed. In hid at home and forced myself to do 6 daily pomodoros. That was enough to keep my job and think about other aspects of life. Now I have small consultancy, run my own product development and do my 4-6 daily pomodoros to keep that nice big corp salary. Management has changed, so I am coming for couple days to the office to chat and visit my own clients in the same city afterwards.
At the end I see burnout as very positive thing what happened to me. I am much better professional and better person. It brought me the understanding that I am not more than excel row for big corp and I must take care of myself by myself. Loyalty does not pay off.
Take your time, try keeping a job somehow. Looking for a new job while being mentally off track is very very hard.