Even if the entire world considers you a tzaddik (pious and righteous), you should nevertheless think of yourself as if you were sinful (Niddah 30b).
In 1965, I visited the Steipler Gaon, a sage whom people often consulted for medical advice. Since he had heard that I was a psychiatrist, he wanted to find out new developments in medications for mental illnesses. I related to the Gaon whatever I knew about the most recent advances.
"Is anything available that can cure someone from delusions?" he asked. I told the Gaon that delusions were very resistant to treatment, and that while antipsychotic medications could subdue overt psychotic behavior, the delusional thinking itself was difficult to eradicate.
"But what if someone has the delusion that he is the greatest tzaddik in the generation?" the Gaon asked. I could not restrain myself and laughingly replied, "No medication can cure that."
The Gaon shook his head sadly. "Too bad," he said. "That malady is so widespread."
Delusions of any kind are a sign of mental illness. How sick a person must be to consider oneself a tzaddik, and how wise the Talmud was to caution us against developing such delusions!