Imagine a brass player going for a note in the upper register; a diver about to attempt a difficult dive; a wide receiver out for a pass. In all these cases there is a certain necessary confidence. You have to think you are going to make it, because tentativeness will make you fail and possibly hit your head on the diving board or get gored by the bull. In other words, confidence itself is an intrinsic part of the action. There is an unavoidable component of ego involved. Think of the proud body language of the flamenco dancer. Without this posture the dancing will not be convincing.
Yet advising someone to be more confident or egotistical is usually not at all productive. Confidence all by itself does not allow you to hit the note, it merely prevents tentativeness from getting in the way. In other words, confidence only kicks in when mastery is already present. At the same time, you might imagine the dance instructor to tell you to hold your body in certain way even before you have actually earned the rights of arrogance.
Excessive arrogance is socially unacceptable, yet excessive self-deprecation does not work either, except in limited doses as a rhetorical captatio benevolentiae. Your writing needs to project a certain amount of strength in order to be taken seriously.
My own internal language about confidence is very masculine. I am very competitive; I think in terms of kicking ass, proving my enemies wrong, rising to the top, etc... Some of this is probably excessive, but some element is intrinsic to the act of writing itself. The excess part is not necessary, but it is motivating to some extent.