38 And the reason He prayed that the cup might be removed from Him, if that were possible, was that, though with God nothing is impossible, as Christ Himself says, Father, all things are possible to You, yet for man it is impossible to withstand the fear of suffering, and only by trial can faith be proved. Wherefore, as Man He prays for men that the cup may pass away, but as God from God, His will is in unison with the Father's effectual will. He teaches what He meant by If it is possible, in His words to Peter, Lo, Satan has sought you that He might sift you as wheat: but I have prayed for you that your faith may not fail. The cup of the Lord's Passion was to be a trial for them all, and He prays the Father for Peter that his faith may not fail: that when he denied through weakness, at least he might not fail of penitential sorrow, for repentance would mean that faith survived.
Source: On the Trinity (New Advent)