Depression, or sometimes clinical depression was a mood disorder that caused a persistent feeling of sadness and loss of interest. It often followed a traumatic event, such as the death of someone close. Depression could also be caused by biochemical imbalances.
In 2268, Spock speculated that the suicides of all adults in the Starnes Exploration Party were caused by an outside force, either by bacteria or chemically induced depressions and suicidal anxiety. (TOS: "And the Children Shall Lead")
Following the death of her father in 2358, Kathryn Janeway spent months in bed sleeping rather than dealing with her emotions. Her sister was ultimately responsible for helping her move on with life. (VOY: "Coda")
Miles O'Brien suffered from depression in 2372, after the Argrathi had implanted him with memories of a twenty-year imprisonment, which culminated in him killing his cellmate Ee'char. Julian Bashir prescribed O'Brien regular medication and visits to counselor Telnorri. (DS9: "Hard Time")
Aboard the USS Voyager in 2375, B'Elanna Torres believed she had lost all the family she ever had once Chakotay had informed her about the destruction of the Maquis in 2373. When Torres began running dangerous holodeck programs without the safety protocols in order to inflict physical pain on herself to satisfy her feelings of guilt, The Doctor diagnosed her with clinical depression. After Chakotay confronted Torres with a holodeck recreation of the massacre, she eventually dealt with the feelings by helping the Voyager crew on a daring mission to rescue a multispatial probe aboard the newly-built Delta Flyer. (VOY: "Extreme Risk")