The self-doubt is all a part of the requirement for drama od the series, Barry's 'journey' as it were. The format for The Flash is not much different to that of Smallville, the series charted the mopish Clark Kent as he comes into great power and has to adjust to both that and the moral and personal responsibilities that such power then requires. Clark's journey naturally reaches its conclusion several seasons later as he puts his ghosts to rest and accepts his destiny as Superman - stamping his and the series' Terminus by incredibly shoving Apokolips away from Earth and thereby his past baggage.
For exactly the same reasons Barry cannot overcome his self-doubts as it would mean the arc of the entire series has reached its conclusion - The Flash would realise to be truly free he has to break free from the crutch of Team-Flash and stand on his own, to do that he needs to accept that he is the only strength he needs. Harrison Wells-2 said it himself that a good deal of the problem with Barry is that Wells/Thawne's interference has ensured that by damaging Barry at such an early age the scars will travel with him throughout his life, and are what is restricting him mentally and spritually from recognising his full potential as The Flash. After inflicting that childhood trauma It was then Thawne who created Barry as The Flash, taught Barry, subtly reinforcing the subconcious idea that he would never be good enough and that inherantly he would never match the power, aura, and seniority of the man in yellow.
Like a loop it is quite likely that Barry will never fully arrive as the Flash until this series reaches its end. Where we may well see him timetravel back and make final peace with his mothers death and accept that he is bigger than that sad event and bigger than Thawne's ghost.
As I said early on in this series much of its bare framework concerning Barry and his self-doubt appears to be mimicing the spirit of Mark Waid's 'Return of Barry Allen' storyline, which in itself, like Smallville, is a story about growing up and becoming ones true self. An adult. And so too is this the Story of CW'S The Flash.
We are on a journey. So let us sit back and enjoy the scenery, as the destination is, thankfully, quite some way off yet!