One of two things is the case when we are criticized. Either someone is speaking the truth to us, or they are throwing a falsehood at us.
If someone speaks the truth to you, it is an opportunity for you to grow and strengthen yourself. I have experienced this type of situation frequently and I always benefit as a result.
If someone throws a falsehood at you, you should not take it personally. Instead you should be aware that when anyone says something negative, it stems from their suffering, their own personal trauma. And so you should have compassion for the person, rather than show anger at the slight or harm. See my post, "A Path to Compassion and Loving Kindness."
Without question, your mind/ego will not want to respond to criticism in either of these ways. It just wants to respond in a defensive way because of its insecurity.
And so, if you want to respond to criticism in a way that is spiritually sound and in your best interest, you must, as in most things, free yourself from the control of your mind and reconnect instead with your true self, which is your heart, your true Buddha nature, your divine essence. See my posts, "How to Free Yourself from the Control of your Ego-Mind," and "How to Find Your true Self, Your Heart."