There are numerous factors which could negatively affect a person’s mental health.
Common factors amongst children and teens can be - child abuse, loneliness, loss of parent/sibling and bullying. In older persons they could include factors such as - lack of sleep due to extra working hours, poverty, a long-term physical health disease, unemployment, homelessness or maybe drug/alcohol misuse. Additionally, incidents like a violent crime, lifetime injury or fear of sudden death could also be major causes amongst some people.
Some major factors that could lead to mental illnesses:
STRESS FACTOR
Stress is defined as any type of change that causes physical, emotional, or psychological strain. Stress is the body's response to anything that requires attention or action. It occurs when the person is unable to cope with the mental or emotional pressure.
A certain amount of stress is a daily part of life. Small doses of stress help people meet deadlines, be prepared for tests or presentations, and arrive on time for important events. However, long-term stress can become mentally harmful. At first,it could lead to some basic changes in personality like frustration, hostility, isolation or maybe even reduced work efficiency. However, when stress becomes overwhelming and prolonged, the risks for medical and mental health problems increase.

With a limited amount of stress, self care can largely help to reduce it. At first, a person could start by improving eating and physical habits such as reducing alcohol and caffeine, completely attempting to avoid drug use or tobacco consumption, exercising regularly and getting atleast 7 hours of proper sleep.
The importance of external help becomes necessary with continuous and large amount of stress. In such scenarios, support of family and friends could largely help to regain a sense of emotional well being. If the person continues to feel overwhelmed by stress, seeking a health care professional or counselling sessions should be the immediate step for which, one should not neglective.
ECONOMIC FACTORS
Unemployment directly hurts an individual's emotional well-being, self-esteem, and more broadly their mental health. Increasing unemployment has a significant impact on mental health, predominantly depressive disorders. It may worsen mental health, and mental health problems may make it more difficult for a person to obtain or hold a job.

An economic crisis is a severe and sudden upset in any part of the economy, which might also lead to recession. Mental health problems, excessive drinking, suicide and sometimes alcohol-related deaths tend to increase during such economic downturns. Such times directly hit people with low-income as it could even lead to their loss of house or business. Governments play a large role in helping these people by issuing family support and debt relief programmes.
BIRTH
Most people who experience a mental health problem don't have any parents, children or other relatives who have experienced the same condition. However, it is believed that there are some mental health problems that may run in families. They could primarily include disorders such as autism, bipolar disorder or schizophrenia. For example, a child is more likely to develop schizophrenia if the parent has had the condition. But there is no guarantee as the child could also get the disorder because of other factors such as the environment he/she grow up in.
Although the development of some mental health problems may be influenced by our genes, researchers haven't found any specific genes that definitely cause mental health problems.