In short, no.
It's not about clearing your head a bit, it's about needing professional help which lets you break out of the downward spiral that you are in. Which, otherwise, inevitably will end in your demise.
Depression is a mental disorder, and these are heavily stigmatized. Which, in particular with depression doesn't help with getting better. If you tell them that you will leave, it is possible, and even likely, that you will be asked why. Yup, they're not entitled to do that, but who cares. Mental illness? Woah, behold the nutter! Don't let that happen, it's not going to do you well.
The normal procedure that everybody else follows with any kind of illness, and which you should follow as well, is to go on sick leave and file in your Cerfa without delay. No stories, no advance warnings.
Second, being honest can turn against you, talking out of experience. Some 20 years ago, I worked for half a week with high fever. Before that happened, everybody else had flu and called in sick (without hesitation, of course), I was the last to remain.
In an environment where "nobody here" means as much as "people will die", it's not easy to just call in sick as the last man standing. Thus, I drugged up so I remained standing on two feet, and pulled through, more dead than alive, until the first came back from sick leave.
After that, I told my boss (who was well aware of the situation) that now I would have to call in sick for 2-3 days to recover. Which was, well, pretty obvious. Or so I thought.
Big surprise, you never would expect your boss can be a total asshole. His reply was: "You know, when skiving off work, one normally has at least the decency not to announce it in advance".
So, out of experience, I can only recommend: If you're sick, for whatever reason, take sick leave and well, devil-may-care, whatever. Don't assume that people will be kind and understanding, or even fair.