For me, there's been a conscious effort to stay happy. I believe that you can choose how to feel. It's not always easy as I can tell you from experience.
My method is to be aware of myself and my emotions so I can stop negativity in its tracks. When something happens (like losing a friendship or a change in a relationship or a downturn at work) I try to catch it before I go too far into wallowing in emotions. I notice that something has happened that could affect me. I ask myself whether I want to be angry, upset or sad. Usually, I don't. Sometimes one slips by me and I get to feeling wretched. Then I let that go and start again.
It's a process. It gets easier as you practice it. I now have a larger gap between the event and my reaction which makes it easier to choose how I will respond.
I also continuously feed my mind and body well. I try to stay away from negative input (many news stories, people who have drama, reliving painful past memories). I read uplifiting books, I converse with wise people, I spend time doing things that I enjoy.
I used to have intense periods of depression, real lows like you describe. Now, I have discovered they don't serve me in my life and I avoid them. For me it's a matter of choice and perspective. If you feel you need to see a doctor, by all means do so.
This article of Steve's helped me.
Good luck. I believe you have the power to make your life fantastic.