I am not by any means a great climber, it would probably be even a stretch to say I am a good climber. When I am climbing my best, I can lead straight forward 5.10a's or, occasionally, if I know the route 5.10b (19/20) clip-ups. On gear, I'm struggling to lead 5.8 (16) with any degree of confidence. Climbing, particularly on gear, is such a mental game, and I frequently (especially on gear routes) freak myself out worrying about whether I'll get gear, whether I'll be too pumped to place it, and, of course, whether it will actually hold if I fall on it.
Today was one of those days when you psyche yourself out the first lead of the day and never really get your mojo back. Happens to all climbers, at all grades, drives all climbers crazy, but, in the end, you have to learn something from it and move on.
I certainly learnt a few things today. First, if you look at the climb and think it will be hard, it will feel hard, no matter what. Much better to look at the climb, think the moves through, work out where you will rest, where you will place gear, where you will move on through, and then set off with confidence.
Second, don't overprotect. I tend to do this on gear climbs when I am feeling sketched out. Sometimes, I look down and see that the double length draw from my last piece reaches down to my second last piece. Sure, you need the confidence of a piece of gear to make a hard move, but, at some point, over-protecting just saps your strength and makes you even more doubtful about your ability to lead the climb.
Stay calm, breathe deep, shake out, and go for it.