Smoke lots of weed and go goblin mode regularly, ideally before burnout begins. Prevention is the best medicine.
Being aware that you're about to burnout before you do allows you to prepare and minimize the damage. Figure out some warning signs that happen before you burnout: e.g. you start feeling less inclined to do things you enjoy, you start sleeping more hours, etc.
If you're gonna burnout, start taking on less tasks and start setting smaller goals and expectations of yourself.
This is assuming that you can actually lessen your workload somehow. Idk how to stop burnout if you have no choice but to be worked to death.
Also regular exercise helps build your capacity for work in the long term, and becomes something you can reduce/drop when times get tough.
Edit: also cutting out alchohol helps me. the smoking weed recommendation might not necessarily be a good one. weed helps me get thru the burnout but makes my depression worse