A corollary is when it feels like you've just wasted a bunch of time, when in fact you got a lot of work done. A common example of this is when you spend 18 hours trying a dozen solutions to a very hard problem, with none of them working. At the end of it all you tend to feel like a failure because nothing worked, but in reality you went through the very necessary process of narrowing your solution space and learning about the problem.
I guess in general our emotion mechanisms misfire a lot.
The "tortured academic" motif is especially problematic; academics are mostly employed to expand the sum total of all world knowledge, but it's often supremely frustrating.
This always frustrates me, if I try 3 different ways to do something of which 2 are dead ends and one works I feel that the 2 dead ends were wasted time because very little of them ended up in the final solution.
Worse is when you find those dead ends while working for somebody who doesn't understand software. I've seen consultants stiffed for weeks of billable hours for researching technologies they were specifically asked to research.
"In the end, it was faster to roll our own than integrate X, and we'll be able to move quicker in the future."
"Then why did you waste all that time playing with X???"
Even worse is when you know before you start that you are probably going to spend 2 days chasing dead ends because you don't know the problem space yet and need to try a bunch of different things. Battling procrastination in this situation takes a ton of will power.
I guess in general our emotion mechanisms misfire a lot.