In the Yog Vasishta, Rishi Vishwamitra takes Ayodhya prince Ram to Sage Vasishta for guidance in dispelling his depression and doubts about preforming his duties. The struggles and moments of uncertainty of the main characters, often presented as powerful, wise and all-knowing, are described in great detail throughout the texts. It is unfair to expect humans to always be confident when even gods seem to experience self-doubt.
However, self-doubt cannot be justified by insufficient preparation or knowledge. We need to be comfortable with expressing our lack of confidence, as this would demonstrate true confidence and reassurance, even in professional settings, and help us stay humble and grounded.