The death of my own estranged father made me completely reevaluate the opening of The Accidental Prince. The rewritten version that will go Premium has my main character far more conflicted and less hateful than the original. He also recognises surrogate father figures in his life. In the end, the book became a lot more about family than it would have previously been without that bereavement.
Another work that I definitely used to process through trauma is Freedom's Pyre (previously Freedom's Gate). I'm not going to get into specifics, but the main character of that book is abused and neglected by his parents, who favour his older brother more. The specifics of the abuse that Kit suffers are completely different to anything I went through, but the feelings and conflict he feels is definitely coming from somewhere deep inside. Some of my readers know that it is written from that perspective, but I mostly don't tell them. It has led to some readers becoming frustrated with characters at time (WHY CAN'T THEY JUST HURRY UP AND BANG??? WHY IS THIS CHARACTER SO ANNOYING AND OVERTHINKING THINGS ALL THE TIME??? WHY WON'T HE THINK ABOUT HIMSELF FOR ONCE??? etc) but the path to recovery is real and has been praised by others who are working through those same issues. Those are the ones I'm predominantly writing for - to let them know that it'll be okay. And I don't have to explain to those people as they can sense the authenticity of the sentiments. The ones that do question it or have problems with it aren't my target audience anyway.
(Also, I should note here that Freedom's Pyre is not an angst-ridden abuse story. No graphic abuse happens on page and the majority of the novel is focused on the character's journey away from his abusers and building up a life that has meaning without them. It's a lot more about magic and swords and cool guys called Shin than it is about the other stuff - though that's there for sure).
All in all, you should write what you want to or need to write. You will find an audience for a story about tough subjects, and perhaps those are the subjects that need to be written about most of all.