1 Peter 4:
12 Beloved, do not be surprised at the fiery trial when it comes upon you to test you, as though something strange were happening to you.
13 But rejoice insofar as you share Christ’s sufferings, that you may also rejoice and be glad when his glory is revealed.
14 If you are insulted for the name of Christ, you are blessed, because the Spirit of glory and of God rests upon you.
15 But let none of you suffer as a murderer or a thief or an evildoer or as a meddler.
16 Yet if anyone suffers as a Christian, let him not be ashamed, but let him glorify God in that name.
Edward Polhill in chapter 3 of A Preparation for Suffering explains how a right conscience before God can help us to bear the weight of suffering:
The Christian must secure to himself a good cause; he must take care not to suffer as an evil doer; this is not grateful to God, nor honourable among men; in it Christ is not imitated, but Christianity is shamed: such sufferers are the devil’s martyrs; it cannot be reasonably expected that they should have the gracious presence of God, or any comfort in conscience; their own hearts cry out, guilty, and plainly tell them, that their suffering is but the just wages of their iniquity. A Christian must be sure, that there be no guilt in that which he suffers
Thus it is for Christ’s glory and our good that we keep from suffering for the sake of our sins. Thus even our self-interest should incline us from sin.