Notice whenever you beat yourself up for perceived failures or imperfections.
Then once you notice them enough, you’ll start realizing how ridiculous and automatic they are.
If they are still constant and difficult to manage, then it may be a good idea to visit a therapist because chances are someone or something put that self criticism algorithm in your head.