This is such an interesting question. It can be answered at least two different ways.
Events going on in my life do have an impact on my writing although by the time I’ve revised the manuscript many times the circumstances that might have colored the writing at one point have shifted and so the revision, most likely, would reflect those shifts.
If you mean that I identify so deeply with the character that I lose hope when the character is going through a tough time, the answer would be no. I might be writing about a very challenging time in a character’s life but I try to create characters who have the strength to transcend their challenges. If I lost hope I fear the character would plummet into despair and the book would be doomed.