Modern epigenetics is currently trying to form a working theory around the interplay between how environment affects a person's genetics and then in turn how those genetics affect offspring. The hypothesis posits that environmental conditions which cause a mental state in a person can leave a genetic remnant on that persons genes which are then passed down to their offspring.
Meaning. If a person goes to war, comes back with PTSD, and then has children after having developed PTSD. Their children will in turn have a higher genetic probability of developing PTSD too.
The inverse is also true according to this concept. Namely, that a person who's father has PTSD, and then either fails to develope PTSD themselves, or developes PTSD but then works through it and mostly heals before having children will pass on a more positive genetic probability of developing PTSD to their children. Once you get a few generations down if each family member in a family tree overcomes the condition before having children their children will have virtually no chance of developing the condition barring another extenuating non-genetic environmental cause like a war.
All this means is that when we see people who come from horrible families they are not only environmentally disposed to bad mental health but also genetically disposed to bad mental health and often even intergenerationally disposed. There's a lot working against some people, and sometimes it requires grand environmental interventions to help them, and do to how fucked our cultures are in general this century that is increasingly rare.
The only hope, is that if you do make it out, you are actively removing bad traits from the gene pool. Genes are likely not static even within a person's lifetime despite previous scientific assumptions from the last century. They may be malleable things that change as we change.
Please no one take this as an argument for eugenics, it's not at all. Quite the opposite, empathy may help eliminate genes that are generationally traumatizing humanity. Moreover, people are not static predetermined things. People have a measure of agency to combat predisposed genetic probability and environmental influence too can make a worlds different. It's not some simplistic nature vs nurture, but rather an interplay of all causal interactions that make up a human being whether genetic, environmental, otherwise.