Easier said than done. This New York Times article provides gentle insight into how we developed this self-criticism, and more importantly how we can change!
https://www.nytimes.com/2018/05/22/smarter-living/why-you-should-stop-being-so-hard-on-yourself.html