The devotion to the Sacred Heart of Jesus, historically, is a development from the devotion to the Five Wounds of Christ and is strongly linked to Eucharistic devotion. It is also far older, and has been with the Church, in one form or another, since patristic days.
The Divine Mercy devotion is rooted in the writings of St. Faustina and is, like the Sacred Heart devotion, linked to Eucharistic devotion, but in a less material and more symbolic and spiritual sense.
Both focus on the love and mercy of Jesus, especially at His death. I think the two, however, have a different focus, by looking at the prayers associated with them. The Divine Mercy is focused more on Christ’s Divinity, whereas the Sacred Heart devotion is more focused on His Humanity. The Divine Mercy devotion seeks to call God to us, whereas the Sacred Heart devotion seeks to bring us to God (which is why it focuses on the Humanity of Christ - the humanity Christ divinized by His Incarnation.) Specifically, the Divine Mercy devotion is a plea; the Sacred Heart devotion is an imitation. The Divine Mercy seeks reparation for deeds done, whereas the Sacred Heart calls for deeds to be done. They are really like two sides to the same coin, really.
At least, this is how I understand it.