Think of your mind as your computer. You know how, the more things you have running, even in the background, the slower your computer does things? Our brain is similar. Anxiety and depression take up so much processing, it slows us down.
Also - thinking is a bit like working out. The less you actively try to think, the harder it is to keep the habit of thinking.
So, we need to keep our minds active. It's the same thing as older people doing the daily crosswords and such, to keep themselves sharp.
It doesn't help our depression that feeling stupid, or slow, feeds into our negative thoughts.
The good news is it will pass, if you start actively thinking about stuff.