The catastrophies of Riya (show off) are great. One should exert much to save one's self from these calamities. But this should be remembered that this is also one of the ways of shaitan (satan) hijacking our niyyah and making us to leave the good deeds
(Aamal-e-Saliha) by putting an apprehension (waswasa) in our mind that we should not do a (particular) deed otherwise we will commit the (sin of) Riya. At this time one should reply the shaitan (while taking the note of this apprehension which shaitan has put in his mind) that the Riya takes place only when our aim is to show our deeds to Makhlooq so that they become pleased and when we enjoy this idea (that people are seeing our good deeds and they are becoming pleased with us). On the contrary, our condition is such that we consider this thing bad and want to get rid of it (whether it goes or not), then how is it Riya? After saying this, one should engage oneself with good deeds (Aamal-e-Saliha), one should not care even least about these apprehensions and evil suggestions (of shaitan).
You will experience these apprehensions few times
but then shaitan will get tired and will run away shamefully.
Maulana Alhaafiz Imdad-Ullah (RA) used to say:"Riya does not remain always Riya, firstly it is Riya, then it becomes a habit, and from habit it becomes Ibaadat and Ikhlas. "
It means that we should not bother about the Riya which
gets committed without any purpose and should not leave the Aamal-e-Saliha because of this.
-Taken from Furu-ul-Iman by Maulana Ashraf Ali Thanwi (RA)