When I was in grad school, I went through exactly what you are experiencing. My advisor sat down with me and said:
"Take a month off. Go hang out with family and friends. Don't think about work. Eat well & exercise. Then we will talk."
It was the best advice I ever got. I realized while I was away that I was working on the wrong problem, and that with some reframing there was a way out. You can't get that perspective while you are in the middle of things.