Sorry, non-English speaker's comment below:
I was depressed for almost 10 years. It started in my sophomore year of college. Initially I would finish 3 hour programming assignments in 10-15 minutes and was the student representative of the CS department. I had a lot of friends, and was quite 'normal' I suppose. Then things started literally falling apart. I lost interest in my old hobbies, stopped talking to friends, kept failing classes, found no pleasure in anything. I asked my roommates to find another place and started living alone, and then decided to commit suicide by cutting my wrists in the bathtub with a knife but pussied out when the blade touched my skin... Fuck, what a nightmare.
However, I somehow dragged my feet through this misery and managed to graduate (two years late and at the bottom of my class) and luckily bumped into an old friend who remembered how good I was with computers back in highschool. He was running his own company and offered me a (non-programming, IT) job. It was great at first but once again the depression started rearing its ugly head and I started slacking off at work, being late for appointments and isolating myself again.
I tried doing the things people seem to suggest online like exercising regularly (never could for more than a month), yoga, mindful meditation, but I would always relapse.
It took me 6-months to finally get the courage and see a psychiatrist. He diagnosed me with depression and anxiety and put me on lexapro. I could never imagine how much 10mg of something could change your life.
Within a few days I started seeing major changes in myself. It rekindled my interests in my hobbies (programming, gaming, reading etc.) my memory improved tremendously, I felt compassion towards my friends and family, much more social and became super efficient at work. Fast forward a year and I'm now CEO of my friends company and I've dealt with some personal tragedies on the way without relapsing. Things are holding up pretty well.
If you think you're depressed don't hesitate to seek help. If you notice someone falling apart for no reason and might be depressed, offer to accompany them to a psychiatrist and that you'll keep it confidential. (I wish I had gone sooner)