Swami Vivekananda tells the following story (Complete Works, V8, Discourses on Jnana Yoga VI, available here):
Thought is all important, for "what we think we become". There was once a Sannyâsin, a holy man, who sat under a tree and taught the people. He drank milk, and ate only fruit, and made endless "Prânâyâmas", and felt himself to be very holy. In the same village lived an evil woman. Every day the Sannyasin went and warned her that her wickedness would lead her to hell. The poor woman, unable to change her method of life which was her only means of livelihood, was still much moved by the terrible future depicted by the Sannyasin. She wept and prayed to the Lord, begging Him to forgive her because she could not help herself. By and by both the holy man and the evil woman died. The angels came and bore her to heaven, while the demons claimed the soul of the Sannyasin. "Why is this!" he exclaimed, "have I not lived a most holy life, and preached holiness to everybody? Why should I be taken to hell while this wicked woman is taken to heaven?" "Because," answered the demons, "while she was forced to commit unholy acts, her mind was always fixed on the Lord and she sought deliverance, which has now come to her. But you, on the contrary, while you performed only holy acts, had your mind always fixed on the wickedness of others. You saw only sin, and thought only of sin, so now you have to go to that place where only sin is."
Are there any analogous tales in the scriptures? Failing which are there any scriptural statements which carry the same import? Failing even that --- which sampradayas accept this idea and to what extent and which sampradayas reject it absolutely?