Depression have many causes, such as physical damage to the brain, and/or genetic predisposition for depression. This type of depression can be treated with therapy and medication.
However there is a other reasons for depression as well.
It is a type of depression that affects very talented and intelligent people. Highly intelligent people are often depressed, although they don't commit suicide as often as stupid people. There are studies that show this.
One possible explanation is that intelligent people can often find practical, workable solutions to their problems and work through them. They are more introspective and can monitor and understand their own emotional reactions in a way that most people can't.
Another explanation is that smart people often have smart friends. They can express their feelings, and have friends who understand what they mean. Which prevent the desperate solution of suicide.
A smart person often see themselves as completely normal. For the highly intelligent it is normal intelligence who looks very strange: those who sislikes thinking, have trouble with basic math and logic, who recent rational thinking, can't construct logic models, can't think critically, never build up any higher level of competence at something, is not curious and has no endurance when it comes to learning things, not to forget the lack of interest to learn.
For many people, high intelligence is a curse, a scourge that makes that you can never fit in. You do't laugh at the same things that others do not agree with the others, you get easily bored with others and their stupid subjects. You become uncomfortable because you go through the trouble to understand why, you use your brain, when most people just accept what ever with out a second thought, not being able to comprehend the basic logic of things.
This is also why many people find it uncomfortable to talk to intelligent people. It is difficult to follow the logic, to evaluate the facts and see the connections they make.
For smart people, it's not so fun either. It's no fun to present a logical train of thought, and see the face of the man talking to distorted in a painful look. Even worse when it's friends, relatives and colleagues.
With time you learn. You learns to conceal what you think, always keep a straight face, keeping the mask on. Never drop the guard at work, among relatives, when you are out in public.
Only among a very few people, who have the same condition as you yourself, you can relax. I have yet to meet those people.