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.
The closet of the soul is the body; our doors are the five bodily senses. The soul enters its closet when the mind does not wander hither and thither, roaming among things and affairs of the world, but stays within, in our heart. Our senses become closed and remain closed when we do not let them be attached to external sensory things, and in this way our mind remains free from every worldly attachment, and by secret mental prayer unites with God its Father. 'And thy Father which seeth in secret shall reward thee openly,' adds the Lord. God who knows all secret things sees mental prayer and rewards it openly with great gifts. For that prayer is true and perfect which fills the soul with Divine grace and spiritual gifts.
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.