This is not something that you just possess but rather something that is acquired from experience and cannot be artificially manufactured or conjured up just because you think you need to possess some. Confidence is developed from experience with both success and failures along with serious analysis as to what created each. Then this complete cycle, which being hard earned leads to obtaining serious confidence and not pretend bravado that some people have tried to substitute. Confidence is knowing what you are doing. To understand what you are doing you have to have made all of the mistakes many times to fully understand all of the possible failures as well as what goes into success. Confidence is not a tangible possession and will vary during differing circumstances. Whenever our confidence is down our life preserver is to not get wrapped up in the outcome of a troubling circumstances but to concentrate on our ideal stroke mechanics and pre-shot rituals to enable our energies to be channeled on what we may control for the best possible results.
Mentally this is quite a challenge. The challenge comes from being surrounded by people who are only able to judge results of the object ball finding the pocket or not.