Hear the word of the Lord, O nations,
and declare it in the coastlands far away;
say, ‘He who scattered Israel will gather him,
and will keep him as a shepherd keeps his flock.’
These words were part of a deeper message of restoration that the Lord gave the prophet Jeremiah to share with His people. Even as they would spend a generation in exile in Babylon, God would lead them back out again like a shepherd leads his sheep. They would return to Jerusalem. Israel would again be its own nation. The blessings of the covenant would eventually be restored and enjoyed again. God would change their tears into laughter.
God's judgment is just and true at all times. And He is merciful even as He chastises His people. That is why He could offer these words of hope even as Israel languished in captivity. There were false prophets giving lying words of false hope. Jeremiah was instructed to confront the lying prophets, but then was given a true hope to share with the exiles. God never just confronts. He also comforts.
These facts instruct us at those times when we must confront others. Sin should be rebuked. Lies should be uncovered for their falsehood. Consequences should be explained. But comfort should never be missing. When we are wrong we need both confrontation and comfort. God often frames His message this way. We should as well.