To explain the title - The quality of your writing is in no way related to how you feel as you write. This includes mental states like stress, physical states like illness, even emotional states like heartbreak. Note that this doesn't mean your state won't affect the tone of your writing, as it often does, merely the quality.
I first read this theory in Dean Wesley Smith's series "Killing the Sacred Cows of Publishing." If you haven't read that series, do so, including the comments. It will take a bit of time, but be well worth it in regards to furthering your writerly education.
Back to the matter at hand. I have not felt well lately. I've had a cold that has dragged on for nearly a week, as well as family matters dogging me emotionally. Yet I managed to complete a fairly light-hearted and enjoyable short story for last weeks day of challenge, and another one this week. I've done some writing over the last two weeks besides these stories, but not a whole lot.
If I were to believe that my sickness and general sense of lethargy would preclude my being able to write engaging prose, neither of the two recent stories would have been written. The fact that both turned out well, and are at least as good as anything else I've written, proves the matter. Quality of writing is independent of the circumstances of that writing.
So next time you feel to tired, sick, or emotional to write, do it anyway. Force the words out, one letter at a time if you have to. You may be pleasantly surprised by the quality of your output.