I know a lot of people battle Imposter Syndrome which is when you think you're not good enough to be doing something (like your job or a lecture). If not that then just negative self talk. Neither is productive and can hold you back or even worse damage your mental health.
One thing you might want to try is affirmations. These are just thinking positive statements which you know to be true (e.g. you can back them up with evidence).
These are just some I use, but please create your own or change these slightly to make them your own.
I'm great at debugging
Code I write is beautiful and well formed
Despite some bugs (which everyone writes) my code works well
My colleagues appreciate my feedback from code reviews
Critical feedback is a great learning opportunity
Other Role Related
I may not be Obama when public speaking, but despite my nerves, the audience learned from me
I embrace the learning opportunities in every challenge
I work well with others in my department
The operations/infrastructure/testing teams really appreciate my assistance
I am in control of my life and my career
I love the fact that I'm different
My smile is awesome
I'm not defined by my size
It doesn't matter what others think
It's ok to be myself
If you have any mental health resources at work, why not use them? Also, there are apps such as Headspace.
If you feel more than just imposter syndrome, then don't just accept it. Make the step to get well, these might help on that journey
In the USA you can visit Mental Health
In the UK you can visit Mind
In Australia you can visit Mental health resources