Jesus left an example for his followers in how to act when suffering for doing good. This is what Peter talks about in 1 Peter 2:21-23. To say it in another way, when we suffer for following Christ in obedience to God, we should act in a Christ-like way through it all, following his example. Calvin has a great paragraph on this in his commentary on 1 Peter 2:23. I especially like the part below that I’ve emphasized in bold:
It may however be asked, How did Christ commit his cause to the Father; for if he required vengeance from him, this he himself says is not lawful for us; for he bids us to do good to those who injure us, to pray for those who speak evil of us. (Matt. 5:44.) To this my reply is, that it appears evident from the gospel-history, that Christ did thus refer his judgment to God, and yet did not demand vengeance to be taken on his enemies, but that, on the contrary, he prayed for them, “Father,” he said, “forgive them.” (Luke 23:34.) And doubtless the feelings of our flesh are far from being in unison with the judgment of God. That any one then may commit his cause to him who judgeth righteously, it is necessary that he should first lay a check on himself, so that he may not ask anything inconsistent with the righteous judgment of God. For they who indulge themselves in looking for vengeance, concede not to God his office of a judge, but in a manner wish him to be an executioner. He then who is so calm in his spirit as to wish his adversaries to become his friends, and endeavors to bring them to the right way, rightly commits to God his own cause, and his prayer is, “Thou, O Lord, knowest my heart, how I wish them to be saved who seek to destroy me: were they converted, I should congratulate them; but if they continue obstinate in their wickedness, for I know that thou watchest over my safety, I commit my cause to thee”. This meekness was manifested by Christ; it is then the rule to be observed by us.
Hammond, WI, 54015