The short answer is: Yes, your mental state is partly genetic, but that does not mean that you can’t influence it. We now have clear evidence that many things (from depression and anxiety to heart disease, from sexual orientation to how well you read maps) have a genetic component. After all, all of our abilities, mental and physical, good and bad, are made possible by the designs of our bodies. To love our children we need to be good parents, and we need organs that can produce and perceive feelings of love and concern (i.e. an area of the brain), and the way that these organs are formed (or deformed) will influence how well or poorly they function.
It is not easy to accept that one of the reasons that we love our children is that our brain structure enables us to and most of us prefer to imagine that we love our children because of who we are and not what we are. However, the changes seen in cases where patients have damaged their brains show clearly that while the kind of person we are is critical, who we are, also depends on what we are (and of course where we are i.e. our context). It is not uncommon to find a sexually conservative person becoming promiscuous after a stroke, or a shy person to become loud and violent after a car accident, or even a loving mother to lose interest in her children after a head injury.
The structures in our bodies and their design are clearly necessary, and since our genes play a significant role in accounting for their design a relationship will exist between our genes and all aspects of human functioning, but this is not the whole picture. Humans are highly sophisticated creatures. Our genes don’t just unfold. They unfold in a way that responds or adapts to the environment. This capacity allows each of us to develop in a way and, while this enables the survival of the species, it is not always a good thing. Mothers who were severely deprived and abused as children might have all the right genes but may still not be able to care for their children, in part, because their brains will have adapted to an environment in which care is nonexistent.
It is also important to remember that a genetic vulnerability does not necessarily translate into the condition itself. Someone with a genetic susceptibility to heart disease may live a lifestyle that protects him or her from ever developing the disease. Furthermore, while identical twins share identical genes and hence identical vulnerabilities, we also know that one may develop depression and not the other. The point is this, while our genes play an enormous role in shaping the possibilities for our future but they do not predetermine our future, and we can offset some of the risks that our genes carry.
Knowing that you are likely to carry a genetic vulnerability (e.g. for depression, anxiety, etc.) can alert you to pay extra attention to these areas. There is no evidence to support the widespread view that genetically influenced conditions (e.g. depression or anxiety) can’t be treated or even prevented with psychotherapy. There is also no evidence to suggest that a genetic predisposition would limit you to biological interventions e.g. medication. Having a genetic vulnerability might mean that you will need to work harder for your serenity than someone without this, but it does not mean that you can’t do anything about it.