I'm a current grad student - I have about a year maybe to my PhD. I've
certainly gone through long periods of having nothing work, and realizing
that what I had been doing previously wasn't a good idea (after two months
of analyzing data). It helps to have a very supportive advisor, and to seek
help from someone other than your advisor who is an expert on what you are
trying to do.
But the best help I got was from other grad students. Everyone
has been through that stage, and it's easy to find a sympathetic ear.
My office-mate is great - we take turns being miserable about our work.
My advice would be to find another grad student who's been there a while,
sit down and have a cup of coffee with him or her. Or even better if there's
an informal gathering place - like a lunchroom or departmental library where
people sit around and bullshit. It's a very important aspect of graduate
student life - sharing war stories, complaining about courses, advisors,
university financial aid office, etc. You'll also learn about other student's
research, and maybe pick up some interesting ideas for your own. Older (or
rather, more experienced ) grad students are a great resource - I've learned
a great deal from them both here and when I did my master's.
Good luck! I hope this helps a bit.