If we want to do something but cannot, then before God, Who knows our hearts, it is as if we have done it. This is true whether the intended action is good or bad.
But a sober and prudent man who desires to be saved, when he sees from what it is that he suffers harm, carefully preserves himself from evil remembrances, is not drawn into passionate thoughts, avoids meetings and conversations with those for whom he feels attraction and avoids every occasion for sin, fearing lest he himself ignite a fire within himself. This is the warfare which proceeds from one’s own lust, which a man brings on himself
In everything we do, God looks as the aim, whether it is for Him or for some other purpose we act. So, when we wish to do something good, let us have as our aim not to please men but to please God, so as to have our eyes always fixed on Him, doing everything for Him, lest we bear the labor but lose the reward.
If you wish to be delivered from shameful passions, do not behave with anyone familiarly, especially with those toward whom your heart is inclined by a lustful passion; through this you will be delivered also from vainglory. For in vainglory is involved the pleasing of men, in the pleasing of men is involved familiarity of behavior, and familiarity of behavior is the mother of all passions.