Dogs require taking care of. For someone who is clinically depressed and has huge problems with properly taking care of themselves, taking care of someone else might be extremely exhausting. It can also lead to blaming oneself for not treating the dog properly, regardless of how it's treated. Trust me, I've seen this in people with clinical depression.
Pets can go both ways. I've been in depressed states where my pets were the only thing keeping me going. I didn't want to live any more, but who would take care of my pets? I had to force myself to function so that the pets didn't starve or live in their own feces. That constant, gentle kick in the ass was what I needed a lot of the time.
Like you say, it can unfortunately cut the other way as well. Dogs are an especially high-risk proposition because they are a big time and money commitment, and if a person is feeling overwhelmed already... that could be trouble.
Possible compromise: volunteer at an animal shelter?
Yes! Dogs are also absolutely fantastic for motivating you to get out of bed and go for walks on a daily basis.
When you're in a low, low, low place you might not care about yourself enough to get out of bed. Or the world might be too painful. Or both things, plus one hundred other things.
But you will not stay in bed when you have that dog depending on you. You will not let the dog go hungry nor unwalked.
That said, a dog is not a magic pill! A dog is a huge commitment, nearly on the level of having a child, and if feeling overwhelmed is one of the causes of your depression, a dog could exacerbate that.
Do it, OP.