I’ve been reading “Body keeps the score”, and one of the concepts that came up is pretty much this.
Instead of rejecting the self that is “bad” (“I’m always critical and I hate it”), objectively acknowledge that part of self(“There is a part of me that is a critic”). Then, accept/thank that part has been doing that for a reason (“My critical self is trying to stop me from getting hurt”).
Just like you, I’ve found it helpful to looking inward and “thanking” them for protecting me. But gently telling them that it’s not needed anymore.