My experience is that as far as normal bouts of "feeling depressed" go, I have to have this attitude of my work being separate from my emotional state. I remember going through really rough times while I was doing a humour comic, and I just knew that every other night I had to be able to sit down for 5 hours and be funny; that's my job. Crafting a good and honest joke was something that was important to me whether I felt like laughing or not!
I do wanna say, just so that it's been said, I definitely think it's possible to feel depressed without going through Clinical Depression, but I've watched friends deal with the mess-with-your-head chronic Depression that makes it hard to care, hard to connect, and hard to make yourself do the things you need to do for months at a time --- and I really see it as a different beast, where a can-do attitude and the knowledge that "welp, it's gotta get done" can't help nearly as much as medication and therapy can.
I had one friend in freelance who had bad anxiety that kept her from working for the entire day when it got bad, and she realised, if it was getting in the way that much, she couldn't just work around it -- she needed to talk to someone who could help her learn how to handle it. Now, her anxiety does still get in the way, but it rarely knocks her out completely like it used to.
TL;DR, in my experience, if it's temporary and you can push through it, you do that. If it lasts a long time or can't really be pushed through, then you treat it the same way you would if a physical injury were preventing you from working -- you get a medical professional to look at it and see if they can do anything to help.