This sounds far too familiar. I'm in my third year now and, looking back at my PhD, I think I had phases of feeling ok and having fun, and phases where nothing was going right and I couldn't help wondering if it would be a better plan to quit and get a normal job.
I don't really know what to suggest, but I'm fairly sure that it's a perfectly normal thing to be going through.