The key to not being sent to rehab is seeking help yourself. By coming to this forum you have started the process and i commend you for that. The first steps are the hardest and admitting to yourself you have tis disease can not always be easy.
Firstly i would have you go see a Dr. They will be able to do a mental health assessment and determine the kind of depression you have and what stage you are currently in. They will also be able to refer you to a specalist who can give you the help you need. If you are still in school you may be able to seek a councellor or speak with someone you trust such as a teacher.
Doing this for yourself is also the most important thing. Letting yourself be depressed is far to easy. Find the methods that works for you and you will not believe the difference it will make. It may not seem like it now but there is light at the end of the tunnel. Just a matter of letting youself find it.
Remember you have control of this and we are all stronger than we give ourselves credit for.
Good Luck
Natalie