Here's a quote from the amazing Katherine Paterson on just this topic:
I cannot, will not, withhold from my young readers the harsh realities of human hunger and suffering and loss, but neither will I neglect to plant that stubborn seed of hope that has enabled our race to outlast wars and famines and the destruction of death. If you think that this is the limitation that will keep me forever a writer for the young, perhaps it is. I don’t mind. I do what I can and do it joyfully.”
-Katherine Paterson, A SENSE OF WONDER: ON READING AND WRITING BOOKS FOR CHILDREN
I love Ms. Paterson's idea of a "stubborn seed of hope", something that grows beyond painful circumstances, something that can anchor both the character and reader in a better future to come.
Do you shy away from heartache in the books you read or write? Why or why not?