4 But I would not speak of these things: for I say that such was the abundance of God's care, that we may know His goodness, and His love towards man, not only from the way in which He has honoured, but also from the way in which He has punished us. And this, I especially exhort you to consider with attention, that God is alike good, not only while He is treating us with honour and beneficence, but also while He is punishing and chastising. And whether we should have to carry on our contest and combat against the heathen, or against the heretics, respecting the lovingkindness and goodness of God, we shall make His goodness evident, not only from the cases in which He bestows honour, but also from the cases in which He inflicts punishment.
For if He is good only while honouring us, and not good while punishing us, He were but half good. But this is not the case. God forbid! Among men this may probably happen, when they inflict punishments in anger and passion; but God being free from passion, whether He exercise kindness, or whether He punish, He is alike good. Nor less does the threat of hell serve to show His goodness, than the promise of the kingdom. But how? I answer. If He had not threatened hell, if He had not prepared punishment, there are not many who would have attained the kingdom. For the promise of good things does not so strongly induce the multitude to virtue; as does the threat of evil things compel by fear, and arouse them to the care of the soul.
So that, although hell be the opposite of the kingdom of heaven, yet each has respect to the same end— the salvation of men; the one alluring to itself, the other driving them towards its opposite, and by the operation of fear correcting those who are carelessly disposed.
Source: Homilies on the Statues (New Advent)