The teachings of Jesus are meant to produce despair in the sense that if what He says is true, then our situation is hopeless.
“Be holy even as your Father in heaven is Holy.”
“Blessed is the person who has nothing in h/him for God to find fault with.”
Can we measure up to the standard of perfection? Of course not. Yet Jesus says only the pure in heart can stand before God. If you want to be good enough to be good enough for heaven, the standard is perfection. The alternative is eternity in hell.
There’s no human way out of that predicament.
The New Testament says that Jesus came to make it possible for any and every person to be forgiven of real guilt.
No one is so good that forgiveness isn't needed.
No one is so evil that forgiveness isn't offered.
When we are born again the Holy Spirit goes to work conforming and transforming us into the likeness of Jesus. Jesus' righteousness is imputed to us. Many people find that a scary prospect. They would rather remain as they are, rather than be changed into something different. Those people have not yet grasped the desperation of their situation.
So long as we think that we have our morality well within our own grasp, we do not need Jesus. As long as we think that we are good people, Jesus will leave us absolutely alone.
“For I came not to call those who think they are righteous but those who know they are not righteous.”
Many people mock those who claim a “jailhouse conversion.” I understand the temptation. Some of them will be not be genuine. For others however, it is only when we have been hit hard and realise our own depravity, our own helplessness, that is when we find that it is not a cowardly thing to turn to Jesus. It's in those times of reality that we realise that Jesus is the only way out.