Who do you see when you think about yourself? That's your identity. If you only see gender, race, religion, job, position, wealth, etc., then you are only seeing the superficial - not what you were created to be.
Jesus said, "One thing you lack."
At this point the man may have thought, "Here comes the collection plate." Perhaps he may have been willing to give 10%, 30%, or maybe even 50% of his great wealth to ensure his salvation if the teacher asked that much.
Jesus continued, "Go and sell all you possess and give to the poor, and you will have treasure in heaven; and come, follow Me." (Mark 10:17-27) He told this man he must destroy his self-identity (RICH) and let the one true identity (Jesus) take its place (follow Me).
"ALL? He wants me to give everything? My identity is RICH. That's who I am. That's losing everything ... like dying." Unwilling to pay that price, the man turned away losing infinitely more than his wealth.
Jesus said we must deny ourselves and take up our cross in order to follow Him (Luke 9:23). This calls us to crucify the false identity that has enslaved us and put on the Imago Dei (image of God) that frees us as we were created to be.
With "Let us create man in our image" (Gen 1:26-27), God imprinted man with a divine identity, and it was very good, but sin turned us into Gollum - loving "Precious" (ourselves) above all else. Gollum's identity was a ring. The young ruler's identity was his wealth. What is yours?
Confident faith comes from a firm foundation. Only Christ provides that.