Why do negative emotions make it hard to learn or work toward a goal?

People concentrate on the emotions rather than the task at hand, so "I can't" becomes a self-fulfilling prophecy.