Peter did both great things and stupid things in his life. One stupid (and seemingly unforgivable) is he denied that he knew Jesus to evade persecution. Jesus, however, forgave Peter because he never demanded perfection from him. Jesus knew that Peter had his flaws, as did all of his followers, but he saw Peter for what he could be: the man who'd preach to thousands on the day of Pentecost and plant churches all over the world. Likewise, sooner or later we are going to realize that are friends are not perfect. Our friends will let us down at times, but this does not mean that they don't love us. They aren't perfect, but neither are we. When we show our friends grace and forgiveness, we also can expect this in our less than perfect moments.
Forgive, and you will be forgiven (Luke 6:37, NIV).