During any period when things are hard, when people are being difficult and the situation is sad, strange or just plain wrong, it is never hard for me to summon up the energy to write. I actually find that I go to that activity first before using any other types of coping mechanisms. If you are in the midst of an upheaval, it's soothing to make lists and write plans to make things feel more grounded and under control. If someone is being awful, it's nice to be able to escape into writing anything at all.
I have actually found that when things are going well, I don't want to stop what I'm doing to go and write. But with all of the troubles that have been going on around me recently, I've been getting a great deal of work done. Of course it wouldn't be ideal to have people making trouble all the time, but once in a while it might actually be the kind of boost that shakes up your writing and takes you in new directions.