Teresa, for clarification: I did state that, if you're going through a particularly rough period, working on fiction might not be a good idea, but to turn to writing in a journal, or possibly working on a nonfiction article, or even just doing research and scribbling down notes on what you read with that, and the thoughts that come to you -- anything to keep the writing going, at least a little bit. It's not necessary that it be polished writing, but something to keep exercising those muscles, so to speak. It's not a matter of "tricking" yourself, or any of that; simply of keeping the mind as limber as possible. This can include writing letters to people, as well.
If you're doing any of the latter, then there isn't the pressure that it be "good writing"... just that you're keeping active. It helps in several ways: it does help (even when you're not aware of it) to keep you from losing ground; it can also help distract the mind from problems a bit and allow you to approach the problem solving with a fresher perspective; it can provide you with a certain amount of recreation, as well as allowing you to get your thoughts down on paper in a less restricted fashion, which in turn may help to clarify in your own mind what the problems you are facing are (and therefore may help you to find a solution more readily); if you're writing letters, sometimes it helps to have that outside contact, as well -- you're venting a bit of the frustration and the angst you're going through, and may feel the support (even when writing) of the other person there... but all of these also, as said, keep you writing as well. It's not formal writing, necessarily, and it allows the mind more leeway than structured fiction (or even nonfiction, if you choose one of the other methods) but it does exercise those talents so that, when you do go back to it, you find it much easier to slip back into the routine of writing more formally. And that, in turn, makes the daunting task of getting back to it once whatever situation it was is settled much less daunting, because -- often on an unconscious level -- you've been producing better work than you may have been aware in the interim, and looking back over it may be struck by how much better it really is... which can be a tremendous boost at a time when it's needed most.
Being someone who also suffers from clinical depression betimes... sometimes quite severely, and in the case mentioned above, struggling daily with suicidal ideation for a prolonged period, so this wasn't anything mild we're talking here ... I stand by my statements, because I know from experience they really do work. But I also know not to expect myself to necessarily turn out formal writing -- but to nonetheless write, as part of fighting the depression, if nothing else. It was, in all truth, part of what kept me alive in such a spot.