I've certainly been affected emotionally when I'm writing several times. There's a particular plot thread running through
Sunshine and Sea Air (I won't spoil it for you!) that makes me really emotional, but I don't find it particularly difficult to write. However,
Sunshine... is a generally happy/uplifting story so it's not really that much of a disturbing storyline, just emotional.
I wrote a story once that I based on a terrible series of events that I was led to believe happened to a friend of mine (now ex-friend!) and I found that very emotional to write at the time, but I later found out that her 'story' was... let's say "embellished"... so it now triggers a completely different kind of emotion for me.
It was a good story though and one I'm still proud of from an authorial point of view!