Here is advice from Padre Quadrupani on how to effectively deal with the most trying temptations:
“In temptations against faith and purity, do not make great efforts to form acts of these virtues, but simply turn a pleading glance towards God, without speaking even to this compassionate Friend concerning the thought that afflicts you, lest thereby you root the evil suggestion more firmly. Then, without disquieting yourself, engage at once in some exterior occupation or continue what you were doing. Make no answer to the tempter, but ignore him, just as though his assault had never occurred. In this way, whilst preserving your own peace of soul, you will cover your enemy with confusion.”
“The most learned theologians and masters of the spiritual life agree in saying that simply to ignore a temptation is a much more effectual means to repulse it than words and acts of the contrary virtues.”
“Though you should be assailed by temptations during your entire life time, do not be disquieted, for your merits will increase in proportion to your trials and your crown be accordingly all the brighter in heaven. The only thing necessary is to remain firm in your resolution to despise the efforts of the tempter.”
The editor of Light and Peace added these words of advice from the pen of St. Francis de Sales to one of his spiritual daughters: “Let Satan rage at the door; he may knock and stamp, and clamor and howl, and do his worst, but rest assured that he can never enter our souls but through the door of our consent. Let us only keep that closed tight and often look to see that it is well secured and we need have no concern about all the rest.”
And in another letter, St. Francis said: “Do you know how God acts on these occasions? He permits the wicked maker of such wares to come and offer them to us for sale, in order that by the contempt we show for them we may testify our love for holy things. And for this is it necessary, my dear child, to feel anxious, and to change our position? No, no. It is only the devil who is prowling around your soul, raging and storming, to see if he can find an open door. . . . Let the enemy storm away; only be careful on your part to keep all the entrances well fastened, and finally he will grow weary; or if he do not, God will force him to raise the siege.”
Quotations from Carlo Giuseppe Quadrupani, Light and Peace: Instructions for Devout Souls to Dispel Their Doubts and Allay Their Fears (St. Louis: B. Herder, 1898).