Oh, heck yeah! I've written with tears actually streaming down my cheeks a couple of times.
Not that I try to insert my own emotions into the story, but if I can't feel what I'm writing, my readers certainly can't.
And everything you think, feel, or do is grist for the writing mill. Even if you're writing things you'll never do, like explore Jupiter, those characters are, or should be, just as human as you are. So feel it, and write it. It'll make your writing better.
Although I'm not big on writing as therapy - I'd rather have a bit of distance and wisdom gained from my own experiences before I incorporate those feelings into a story.