There is a Big Difference Between A Holy Person's Lapse and a Sinner's.
But Scripture clearly declares that righteous and holy men are not immune from guilt, when it says: "The righteous person falls seven times and gets up again." For what else is falling but sinning? And yet, although he is said to fall seven times, he is nonetheless declared righteous, and the lapse into human frailty does not militate against his righteousness, because there is a big difference between a holy person's lapse and a sinner's.
For it is one thing to commit a deadly sin and it is another to anticipate it in thought, which is not without sinfulness; or to offend by the error of ignorance or forgetfulness or by a heedless world glibly uttered; or, by the vice of faithlessness, to doubt something for a moment, due to an inner thought; or to be moved by the subtle titillation of vainglory; or fall back for a short while from the heights of perfection, due to some demand of nature. These are the seven kinds of lapses and, even though a holy man occasionally falls because of them, he still does not cease to be righteous. Yet, although they seem insignificant and small, they still make it impossible for him to be sinless. For on their account he must do penance every day, truly ask for pardon, and unceasingly pray for his sins, saying: "Forgive us our trespasses."
For the one who recognizes that he cannot be justified by the faithfulness of his own works and who believes that he will be freed from the bonds of sin by the Lord's grace alone cannot cease to be holy after a collapse, and he does not cease from crying out with the Apostle: "Wretched man that I am! Who will free me from the body of this death? The grace of God, through Jesus Christ our Lord."
From: John Cassian: The Conferences. Conference 22 XIII:1-2,7