Criticism and beating myself up NAR

I’m realizing I beat myself up alot with my thoughts. If something goes wrong or if there’s something I don’t like but think I should like it to fit it, the negative thought s to myself kick in.

One the other hand, when people give me good feedback to improve upon something or a skill, I have a hard time taking it in and get really angry about it and beat myself up for not catching it. Any ideas on how to resolve improving myself while not beating myself up?