Personally, my experience stemmed from years of underlying emotional abuse as well as slightly difficult situations.
My parents divorced when I was about 8, went through some legal issues with that, then a lot of it was loneliness following that. Then I went to a secondary school I didn't really like. I didn't really get along with many people. Every other secondary school I tried to get into rejected me. Then I finished year 11 with a very unproductive summer and got into a very good sixth form. However, even though I achieved my dream school, I started self-harming a month in after losing my old friends for a stupid argument, and I was unprepared for Year 12. Some reckless behaviour like constant arguments, aggression and unconsented outings happened. What remained of my family disapproved of me.
At the same time, I guess I had philosophical depression too.
I was contemplating suicide since I felt like a complete failure.
It took intervention on my mum's behalf to take me to an intense therapy workshop. It was a bit unorthodox - a group effort where every person has their own issues to deal with - but I've been once before and it was so lovely to return. The therapist that led the workshop, a graduate of Natural Sciences from Cambridge, told me that thoughts form crystal structures within the brain - it takes effort and long-term commitment to convince the habits of the brains that the crystals formed by negative thoughts have no use, instead, rewiring them with positivity.
That way, I can say today that I am on my way to curing depression.
It requires constant diligence as it means you have to force yourself to find a purpose in life, to find joy in little things so that you have the mental endurance to not get depressed by stressful situations (stressful because they can either be dislikeable or likeable, provided that you need to muster energy to go and do them and so put stress on your body). It's mind training to get the neurones in your brain firing with life.
Still, take anything that everyone says with a grain of salt. It is for you to find your own path.
For me, it took a lot of TED talks, a bit of a weird phase in my art, confessions to a few close friends, repeating Year 12, lots of walks in nice weather, and rebuilding the relationship with my family to become harmonious. Another thing was a busy week of work experience - something completely new - which helped get my work ethic back.
Good luck