Mortal Sin is explicitly tied to the Ten Commandments in the Catechism of the Catholic Church. Failure to resolve a grave breach of the commandments puts the person at risk of exclusion from God's kingdom. I recommend a review of articles 1852 - 1864 to get the full flow of the sequential argument.
(I also recommend that you check out Matthew 221 to understand why Jesus didn't list all ten commandments in that discussion with the young man. He was obviously summarizing).
In brief, the view of the Roman Catholic Church:
If you die with the stain of mortal sin upon your soul, salvation
will not be your reward.
Mortal sin is a grave transgression directly related to the Ten Commandments.
- Being in a state of mortal sin vacates the hope for salvation unless admitted, confessed, and reconciled.
Thus, salvation (and its opposite, damnation) are directly related to the Ten Commandments.
Following the ten commandments will predispose a person to not fall
into sin
Failing to follow the ten commandments will predispose a person to
fall into sin, and in some cases mortal sin.
Minor breaches are classified as venial sin, which is related to the
scripture that states that "there is sin that is not mortal." (1 John
5:17)
from CCC 1852/1853: There are a great many kinds of sins. Scripture
provides several list ... {works of the flesh versus the fruit of the Spirit: "Now the works of the flesh are plain: fornication, impurity, licentiousness, idolatry, sorcery, enmity, strife, jealousy, anger, selfishness, dissension, factions, envy, drunkenness, carousing ... those who do such things shall not inherit the Kingdom of God."(Gal 5:19-21)
Sins can be distinguished according to their objects ... or according
to the virtues they oppose, by excess or defect; or according to the
commandments they violate. ...
CCC 1857 For a sin to be mortal, three conditions must together be met:
"Mortal sin is sin whose object is grave matter and which is also
committed with full knowledge and deliberate consent."
1858 Grave matter is specified by the Ten Commandments,
corresponding to the answer of Jesus to the rich young man: "Do not
kill, Do not commit adultery, Do not steal, Do not bear false witness,
Do not defraud, Honor your father and your mother."
1859 Mortal sin requires full knowledge and complete consent. It
presupposes knowledge of the sinful character of the act, of its
opposition to God's law. It also implies a consent sufficiently
deliberate to be a personal choice. Feigned ignorance and hardness of
heart do not diminish, but rather increase, the voluntary character of
a sin.
1861 Mortal sin is a radical possibility of human freedom, as is love
itself. It results in the loss of charity and the privation of
sanctifying grace, that is, of the state of grace. If it is not
redeemed by repentance and God's forgiveness, it causes exclusion from
Christ's kingdom and the eternal death of hell, for our freedom has
the power to make choices for ever, with no turning back.
From elsewhere in the Catechism ... a person receives the state of grace upon Baptism, wherein all sins are washed away. Losing that state of grace is possible, and happens when mortal sin is committed. Restoration of the state of baptismal grace requires the sacrament of penance and reconciliation (confession and penance). (There are books written on this subject; this is the short version).
1 If we review the "the greatest commandment" scene between Jesus and the Parisees (book of Matthew) the church's teachings fits cleanly with both general and more specific commandments.
Matthew 22:35-40
35 One of them, an expert in the law, tested him with this question:
36 “Teacher, which is the greatest commandment in the Law?”
37 Jesus said unto him, Thou shalt love the Lord thy God with all thy heart, and with all thy soul, and with all thy mind.
38 This is the first and great commandment.
39 And the second is like unto it, Thou shalt love thy neighbour as thyself.
40 On these two commandments hang all the law and the prophets.