It will take a while to get back into form. I have the same problem just going from project to project. The last time was after working on a few database project, I wanted to do some basic file i/o. I had to break out the camel book just to get through it.
Dig through some old code. Write a couple utilities. Do some creative fooling around and give yourself time to get back into the groove. Don't get down about it -- frustration is part of what holds you back!
I also found the movie Brazil helps. You will have to not see it to understand it. I watched it three times and it just gets stranger every time. It is a great way to forget about something that's giving you a headache!