This is a tricky one, because sometimes when you have writer's block you start to get the idea in your head that you're not a "real" writer...even if you've been in print multiple times! Two of my books were self-published but my anthology was put out by a publisher before I updated it and put it out in print on my own. Prior to writing these books I worked for years in newspapers and magazines, and right now in my vanilla life I write my own blog as well as blogs for several clients. So the first step to getting over writer's block is re-convincing myself that I am a "real" writer.
The second step is allowing yourself a break, but trying to keep it short. I try to walk if the weather is conducive, or go to the movies or read another book for inspiration.
Third, I allow myself to write stuff I hate. This is hard—not giving up when what flows onto the screen reads badly to me. This may be the biggest challege for me, personally. Every writing session doesn't produce a gem. But some do, if you stick with them.
I don't think there is an easy solution to writer's block. Sometimes the answer is to allow yourself the break from writing (maybe do something else creative). But when the urge to write comes back, grab it and run with it for as long as you can. It will come back...at least that's been my experience.