Saint John Paul II wrote extensively on mercy, including his encyclical Dives in Misericordia:
Although God "dwells in unapproachable light," He speaks to man by means of the whole of the universe: "ever since the creation of the world his invisible nature, namely, his eternal power and deity, has been clearly perceived in the things that have been made" ... In this way, in Christ and through Christ, God also becomes especially visible in His mercy; that is to say, there is emphasized that attribute of the divinity which the Old Testament, using various concepts and terms, already defined as "mercy." Christ confers on the whole of the Old Testament tradition about God's mercy a definitive meaning. Not only does He speak of it and explain it by the use of comparisons and parables, but above all He Himself makes it incarnate and personifies it. He Himself, in a certain sense, is mercy. To the person who sees it in Him - and finds it in Him - God becomes "visible" in a particular way as the Father who is rich in mercy.
Understanding God is to understand mercy, and vice versa. These are some thoughts on the topic.