Some helpful reading:
 “Justice without mercy is cruel”, says Thomas. But, “Mercy without justice is the mother of dissolution"—and, one might add, therefore cruel as well. This close connection between justice and mercy is not sufficiently obvious in human life. The reason for this is not merely the fact that people are often merciless. Rather, it is much more due to the finite character of human existence, which makes all the virtues in the life of the soul appear to be separated from each other and their exercise separate as well.
The situation is different with God. “The work of divine justice always presupposes the work of mercy and it founded in it,” says Thomas. So if God is merciful, then He is not in opposition to justice. That is because in God, unlike in man, justice and mercy are not separated from one another according to their being. . . . In short, we are not able to grasp the nature of God in its entirety and in its unity but always only . . . cont'd