Depression yes, anxiety no (but great improvement in that area).
I spent from around 17 to 22-23 in the darkness of depression, I even had a suicide attempt when I was 17.
This year I've lost my job, separated from my wife, have ran in financial trouble, and am on the verge of losing my flat and living back with my mother. I've suffered from increased anxiety which contributed to me seeking out CBT counselling, but I didn't slip into depression.
What I've learned is that happiness isn't something you are (there are exceptions of course, ie. serious chemical imbalances) it's something you do. Certain ways of thinking, focusing, using your body, using your time.
Things that in hindsight helped me are;
Gratitude;
This is the most important.
Exercises on how to develop the habit of gratitude can be found in every self help book on the planet because it works. There's some great research you can find online that shows research that shows a positive correlation between gratitude exercises and an increase in happiness.
Focusing and appreciating the things in your life that bring you pleasure, inspiration and benefit will increase happiness. Whereas focusing on frustrations, resentments, and things that bring you displease will decrease your happiness.
Go to the greatergoodscience channel on youtube, and type in gratitude and soak in the research and advice.
A common practice is to write down 5 things once a week that you're grateful for, for 8 weeks. It may be challenging the first week, but by the end of the period you will have trained yourself to be grateful.
Inspiration;
I've gone through periods where I was obsessed with hip hop, 'internal' martial arts, religion, critical thinking, etc. Having interests that are forever unfolding keep one inspired and stimulated. Moderate stimulation (unless you're an adrenaline junkie) keeps you happy, the human psyche and body needs moderate stimulation in order to be healthy.
Optimism;
Find support for the belief that things can get better; inspirational stories, people in your personal life, inspirational movies. Social proof is very powerful for developing optimism.
Exercise;
Weight lifting, yoga, tai chi, whatever. The body is designed to move, and for moderate stimulation - a lack of exercise lowers your mood.
Talk to someone;
Online, phone, professional, face to face (the best) - get it off your chest.
That's it. Even with low self esteem and anxiety I didn't have depression. The most challenging part is doing it, because depression can sap motivation.
I forgot one other piece of advice. Laugh. Try to laugh for an half hour a day at least. Find your favourite sitcoms and try to watch the episodes that make you belly ache.
This renowned 'happiness' psychologist presents an 8 week program that helped unhappy people become happier.