Again, I can only speak of personal experience here. This might not actually apply to other people with similar problems.
First of all, there are many problems to address in such a case. There is this obvious feeling of inadequacy that produces a fear of mediocrity. "I will never be able to produce something I will like again.", "Why do my ideas look like shit?!" When you are in such a state of mind … DO. NOT. REREAD. YOUR. WORK. Ever. Because all the bad sides of it will jump into your face. When you are in a normal state of mind, all the less stellar parts of your work you would edit. When you are in an obviously depressive state of mind, you will just abandon the project out of fear of mediocrity.
Another thing I avoid like the plague is the internet, webcomics (I consume webcomics/manhua/manga/manhwa the way normal people drink water) and television. They have a very de-energizing effect on me. They are wonderful when I need to calm myself down, when I need to slowly decrease my focus and get a good night's sleep. But not when I need to rebuild my energy reserves. So, for now, we have concluded that I am depressed and fearful of failure and de-energized.
What really helps me to rebalance my brain, and this will sound so weird, is firstly fruit. A lot of fruit. Fruits have those long-lasting sugars in them that as opposed to processed sugars and they do increase your energy a little bit. But a little bit is what you need to begin the process of getting back in the game. But there is another reason I aim for fruit, a specific fruit. The Chinese honey pomelo. One big, less-bitter, grapefruit with the thickest skin you can imagine. You have to peal the skin off the pulp to be able to eat it. And the honey pomelo isn't the smallest fruit either. Make sure you want to eat the whole fruit in one sitting. So you start with a purely mechanical process that does require some focus. You don't want to rupture the pulp and have juice flowing all over the place and not have anything to eat in the end.
For now, I've just barely rebuild some energy reserves and some focus. I am still depressed. But that is ok. It is like burning methane. You need to give the gas a minimal quantity of energy before the self-combustion process begins.
Now comes the important part. Developing and maintaining the "F*ck you" phase. I have a little bit of energy and a little bit of focus. We all have that one book (remember, visual arts are de-energizing for me) that gets us off. That one thing that pisses the heck out of us, but that we have reread one thousands times nonetheless. It is important that we have reread it millions of times for energy conservation.
I got and take "The Idiot" by Dostoevsky or "Cousine Bette" by Balzac. And I start reading. I know everything that is happening at every page. So the reading process is not as energivorous as it would be otherwise. And I get to the parts that make me want to vomit all over society. And I am building the "F*ck you" momentum. Now, it doesn't build as fast as it would if I were reading about the Yemen war. But the "F*ck you" would be consumed as it would be building up because this new rage would tire me out eventually.
Reading something that makes you mad but that you know by heart is liking taking a safe trip to the dark side. So, I am slowly building up some "anger and hate" energy. Something that needs to be evacuated. And I evacuate it by going through that harrowing reboot process I mentioned previously. I have so much negative energy that needs to get out that I forget the demotivation, the sheer amount of work needed to get back into my rhythm. I still haven't gotten back into the rhythm, I am still full of self-hatred and fear. But I forget it and just reboot myself.
I am a hate-writer, in that sense. It is negative energy that gets me working. Being comfortable, being sat on by the Depression Kitty (an obscure reference to "Big Mouth", a Netflix cartoon. You, @Fennecky, would love it, if you haven't seen it) is not good for me.