In addition to meditation, mindtricks and brainswitching to redirect your brain in another direction out of depression and toward more productive thinking is to do something that is really difficult for you.
Most of us avoid doing difficult things but in the case of a depression hit, it is such a good intervention. For myself, I decided to take piano lessons. It is difficult for me and and the most difficult parts are an instant cure for depressive thinking.
When I am concentrating on a difficult part, it is impossible to think about my depression at the same time. And remember, we must pay attention to our depression because it cannot continue in the absense of our thinking it. Depression cannot think itself. We have to think it. A. B. Curtiss