How can I pursue holiness and yet not be like a Pharisee who is self-righteous?

How do we combat self-righteousness and pride? How do you find balance in pursuing righteousness and holiness and not become self-righteous?