What is legalism?
Legalism is the teaching that the salvation of a person is based on an assessment of his or her own works. Legalism is as damning to the souls of men as Hinduism, Mormonism, and atheism! A host of Scriptures tells us that the law cannot save us. The salvation that Jesus offers is a free gift that cannot be bought or earned.
"Therefore by the deeds of the law there shall no flesh be justified in his sight: for by the law is the knowledge of sin" (Rom. 3:20).
"Knowing that a man is not justified by the works of the law, but by the faith of Jesus Christ, even we have believed in Jesus Christ, that we might be justified by the faith of Christ, and not by the works of the law: for by the works of the law shall no flesh be justified" (Gal. 2:16).
"Wherefore if ye be dead with Christ from the rudiments of the world, why, as though living in the world, are ye subject to ordinances, (Touch not; taste not; handle not; Which all are to perish with the using;) after the commandments and doctrines of men? Which things have indeed a shew of wisdom in will worship, and humility, and neglecting of thebody: not in any honour to the satisfying of the flesh. (Colossians2:20--23)
Here's a word for you; ascetic. Webster's dictionary defines ascetic as "one who leads a live of strict self-denial. especially for religious purposes."
Centuries ago within the Christian church, priests & nuns would lock themselves away from the world. They would even endure much suffering under the pretense of drawing closer to God as well as a means of sanctification (to make free from sin, to make holy). Unfortunately, it never dealt with the sinfulness of the heart. Only our Lord Jesus Christ can transform the sinfulness of one's heart.
"The heart is deceitful above all things, and desperately wicked: who can know it?" (Jeremiah 17:9)
I challenge you, with respect to salvation, to examine why you do what you do. "And whatsoever ye do, do it heartily, as to the Lord, and not unto men;" (Colossians 3:23)