This is all Chris Fowler's fault. When he interviwed Federer after his 2nd round match, he informed Federer that he could lose his #1 ranking if he lost before the semis and Nadal won the tournament. Federer said he was not aware of that because he thought he was far out ahead enough to be out of reach for Nadal unless Nadal won several more tournaments in a row.
Anyway, Federer was cool, calm, and collected in his first 2 matches, losing just 6 total games combined, thinking that his #1 ranking is safe and secure but now he's all nervous thinking that if he loses this match his #1 ranking could be seriously threatened.
I think all the added pressure from knowing he may lose his #1 ranking is one strong factor why he finds himself in the predicament he's in right now.