Attitude is that important.
As Henry Ford said:
Whether you think you can, or you think you can't, you're right.
But I think that there's more. It's possible to inflate your confidence to some extent, but not as much as if your conviction was based upon a solid foundation.
(The metaphor of a house built on sand or on rock fits right here.)
What are those expressions called - when you repeat positive thoughts to yourself? Oh yes, self-affirmations. It seems to me that that practice wouldn't work so well in a vacuum.