Tracy, I'm sorry about your friend. I hope she's going to be okay.
I usually can't write when I'm stressed out or upset about something, but if I'm able to focus, it can be a good way to either channel my feelings or distract me from them. A friend of mine from work was diagnosed with Stage IV cancer while I was halfway through writing Curtain Call, and I wondered how that would affect my ability to write that story because it suddenly hit close to home, but I think it actually helped me deal with my feelings about it and maybe even helped me prepare myself for her death because I just channeled everything into Cary. My friend died the day after I posted the end of CC, and I think that was a relief because even though I knew it was coming, it would have been hard to still have to finish the story after it actually happened in real life.
As far as distractions go, I started Secrets of the Heart one weekend when I was upset about something related to work, but I knew there was nothing I could do about it that weekend, so I just needed a way to take my mind off it, and starting a new story totally worked! It's one of the few times that has happened. Like Steph said, writing can be a good escape.