I could not agree more with Fran. I would like to add some specifics for the physical game, though. Consistency=Consistency. A lot of mid level players are plagued by different stances, different strokes, etc... everything about their game is different. Settle on and PRACTICE one particular... well, style, for lack of a better word. Use the same stroke, use the same pre shot routine, use the same shooting routine, etc. If your basics are consistent, this will help your game be consistent. When it starts to fail you, you can check those things and more likely than not, you'll find an old habit that has creeped back in.
All that said, as Fran pointed out, check your attitude. And she's absolutely right; it's tough to turn off a "bad day" sometimes. This is a funny game and your conscious mind has a terrible sense of humor. It will play with you, mess with your game, make you start second guessing yourself (when your right brain KNOWS what you're doing is right), and that's hard to fight, sometimes, but consistent features, such as your stance, stroke, various routines, etc, will help make your game more consistent.
Bob