Actually, Eissy, some forms of mental illness are not present at birth. Some types of schizophrenia, for example, do not manifest until early adulthood; even hereditary schizophrenia.
Depression can be hereditary or conditional, and conditional depression covers such a wide range. It does not always mean someone is currently experiencing something causing depression; there could have been a single traumatizing event which initiated a lifetime of chronic depression.
Anxiety is similar. It can arise during or after puberty, or be conditional.
Some mental illnesses can be induced with brain damage. For example, frontal lobe damage is linked to rage problems. Some types of brain damage (or developing tumors, hematoma, fluid on the brain from a physical trauma, and so-on) can also induce mental illness. I know one person who possibly has brain damage from alcoholism during their your adult life, and shows distinct signed of schizophrenia, has paranoia issues, hereditary depression, possibly bipolarism or dissociative personality disorder; only the depression runs in their family.