That sounds like me today.
I exercise four days a week, and today was one of them.
I felt terrible, depressed, headache, and unmotivated.
I spent some time on facebook - waste of time.
Looked at some things that should only be looked at when you are alone, and then bit the bullet and did my exercise.
It hurt like hell, and I had to take paracetamol at the end, as I was in agony.
I almost couldn't finish my exercise and felt spent at the end.
After that I had a shower, had lunch, and got to work doing housework.
Now several hours later I feel somewhat better.
So I think the answer is when you feel terrible, do something that will physically tire you out, and get out of your routine if it's not working, or stay in it if it is.
Get out of the house, get a sweat up, and move your body to burn off the stress hormones.
If it hurts it's working, but don't stop until you've burned it out of your system.
Working out when you feel crap will stop the depression from building up incrementally until you are incapacitated, at least that's my experience.