James W. Pennebaker said this quote

People who reported having a terrible traumatic experience and who kept the experience a secret had far more health problems than people who openly talked about their traumas. Why would keeping a secret be so toxic? More importantly, if you asked people to disclose emotionally powerful secrets, would their health improve? The answer, my students and I soon discovered, was yes.We began running experiments where people were asked to write about traumatic experiences for fifteen to twenty minutes a day for three to four consecutive days. Compared to people who were told to write about nonemotional topics, those who wrote about trauma evidenced improved physical health. Later studies found that emotional writing boosted immune function, brought about drops in blood pressure, and reduced feelings of depression and elevated daily moods. Now, over twenty-five years after the first writing experiment, more than two hundred similar writing studies have been conducted all over the world. While the effects are often modest, the mere act of translating emotional upheavals into words is consistently associated with improvements in physical and mental health.