Sad times will be there, such is the ebb and flow of life. However, you can keep it in check. For me, when I'm in a funk I avoid alcohol because alcohol is the thing that'll take that depressed feeling to another level. You may have some triggers of your own, and it never hurts to figure them out at an early age.
As for what to do, set yourself some goals, and don't set goals that rely on other people (getting laid, etc.). Get mentally sharp and physically sharp. If you haven't already, start hitting up the gym. It's amazing how you can feel after a good workout. Also try to figure out what you enjoy doing career wise in life. You may not know exactly what job you want to do, but you can help narrow down the fields by highlighting what you do enjoy (writing vs. lab work, manual labor vs computer work, etc.) Also, trial and error will help eliminate some choices down the road to so it is important to be active (internships/externships). This may provide the "stability" that you are looking for in life, in the sense that you feel you have certain things to look forward to when you get older.
At the end of the day, I think when you are content with who you are you'll notice things in a different light, but what you're going through seems perfectly normal. A lot of teenagers go through these ups and downs. Until then, do what you have to do. Don't feel like going out? Don't. Step back in the social scene when you start getting joy out of it again. Don't force your emotions. However, when you finally do feel like smelling the metaphorical flowers of life, don't hesitate.
G'luck.