I don't "get depressed" over anything as long as my kids are healthy, family members are healthy, and I see no signs of my own not being being healthy. It's a low bar for "deep, down, happiness" (as opposed to "kind of surface-level happiness"), but I've been through enough over the course of my life to know that pretty much most other things can be dealt with/processed one way or another.
These days, after years and years of different and extreme levels of bizarre stress (mixed in with some serious grief), I'm wearing pretty thin in the "emotional/mental energy department"; but it's not, as far as I can tell, "real" depression. However, as time has gone on I've cut back (and now cut out) writing for other people (as with taking writing assignments), because I really can't be bothered (or sometimes guarantee that I'll be in a "concentrating mode" all the time) writing about stuff I don't care about (and for money that's not going to solve my problems anyway).
More than once I've gone looking up "depression" to see if I have signs of it, because - really - as time has gone (I'm talking about thirty years, but particularly the last twenty or so (and even "more particularly", the last ten or so - but things have gotten more bizarre and stressful gradually over time since then), and I've pretty much ruled out clinical depression (even if it were just mild and starting to arise from what I KNOW is emotional exhaustion). In recent times I've even wondered if there's some kind of professional help out there, but since I'm not one to want or need to re-hash problems/stress that come from outside me, I see no point in trying to "talk to someone"; and since I'm not about to risk the side-effects of medication over problems/stress that are around me/outside me, it pretty much means figuring out a way to deal with it in a way that shows my kids (all of whom who have been impacted by a lot of the same stuff that's gone on in our shared lives) that - in spite of it all - I'm still strong and fine.
Anyway, back to the matter of whether I can write under "mood-compromised"/"energy-compromised" circumstances: I can if I write from my head and see some purpose (or maybe a few different purposes) for the subject and/or if it's a subject that "gets me going".
Then, too, sometimes I'll go around something like a writing site and see if there's some subject or question that at least "inspires" me enough to do something like write this post after seeing someone else's. Sometimes, particularly since I tend to write about serious stuff, I'll give my head a break and write some fluff - or even complete foolishness. (Then I'll show it or e.mail it to my kids, and if it gets a laugh or two out of them... that's good too. :) ).
Also, as far as keeping my kids (and possible future grand-children/great-children) in mind; if I'm not in the mood for foolishness or too much "heaviness" I'll sometimes write something that - if nothing else - will help give them a picture of their own life (like their arrival into the world/my life) or else something about my childhood - the kind of stuff that may eventually help complete a picture for them. That kind of writing (at least for me) is easy to come up with because it's only "story-telling" - rather than trying to think up humor or make some "big, serious, point".
It's, I guess, helpful to me that I have a number of "agendas" in life (whether business, personal, or other). Some of them overlap, which means having some kind of purpose (sometimes several purposes) to what I write helps at least drive me to see some use to it. If, even after all those factors/sources of "inspiration"/"drive", I really don't feel like writing; I'll do my own "administrative-type" stufff or "organizing-files/accounts/pages-type" stuff.
Between all that stuff, my own individual (offline) projects, and trying to earn a living of some sort; maybe I don't have a lot of time to get depressed (or maybe one of the many reasons I'm finding "the exhaustion thing" getting worse is my nineteen-/twenty-hour days. :/ (Actually, though, I got about eight solid hours of sleep the other night - which may be why I've now written this long post. :) ).