Answered by Sayyidi Habib Umar bin Hafiz (may Allah protect him and benefit us by him)
I fear that I learn and am deluded and do not act in accordance with what I convey to others. How can I then teach others?
You should obey the command of Allah and His Messenger, and teach. Part of acting on the knowledge that you learn is teaching it. You should dislike any delusion and pride that you have and strive to cleanse yourself from that. If you leave teaching altogether, you may experience a more subtle type of pride. The Devil leads those that leave good out of fear of pride, to think that they are better than those that perform good.
Pious people, however, act out of obedience to Allah’s commands and dislike every evil thought and reject it. They seek the aid of Allah and He then takes them by the hand, raises them and removes all harm from them.