I know exactly how you feel. I've felt the same way myself over the past few days. When it takes over the brain, it really takes over the brain. There seems to be no hope in those moments, but there's always some hope, and the only thing to do is to do something to take away that edge. I find going for a run and repeating a simple mantra helps sometimes.
Remember as Martin Luther King Jr. said sometimes you can't see the whole staircase, you just have to take the first few steps. It's like that. You just have to focus on the one simple job at hand and trust and have faith that it there will be future moments of happiness and joy. I know it doesn't feel like that at the moment, but there always can be. I forget that myself, too. Hope that helps.