Peter lost faith. Jesus spoke often of the importance of faith...faith in God and in HIM, not self. When Jesus arose and returned to the Father he gave Peter and us what we needed to follow and obey him: The Holy Spirit and GRACE. Grace to receive him and Grace to follow and obey him, Those who only speak the law, have no grace and are unfamiliar with God's Spirit. Law only condemns, including the one who insists that law is all there is. The resurrection and the Holy Spirit within, changes us into Spiritual children of God by Grace we are saved...unto good works: more grace. Grace for grace.
John 1:16 And of his fulness have all we received, and grace for grace.