Whether you can or can't.. don't. You WILL get deployed to Afghanistan or Iraq and depression will only worsen there. The military isn't a good place for people with depression problems.
It depends on severity and your past medical history. It also depends on whether or not you're dependent on medications or not. That's the best I can answer without more information.