And after all that has come upon us for our evil deeds and for our great guilt, seeing that you, our God, have punished us less than our iniquities deserved and have given us such a remnant as this...
People who insist that God's mercy and grace are not featured in the Old Testament are either ignorant or uninformed... or maybe they are intentionally stacking the facts and hiding the truth. It seems they have not read the Old Testament. Here is just such an episode of clear recognition of God's mercy and grace found in the theological reflection in Ezra's prayer of confession.
The situation is unique to ancient Israel. God had warned them not to intermarry with the Gentile nations around them. He knew this would lead to a polluting religious plurality and idolatry. It was one reason that the nation abandoned God and that eventually led to the brutal exile judgment in the first place. And now among the generation of rebuilders in Jerusalem who had returned from that exile, this sin had taken place again on a large scale. Ezra grieves over it in confession. And in that confession he finds a merciful and gracious God.
God's mercy is found in the reality that Israel was not treated as fully punished and forgotten. Ezra says they were punished less than their iniquities deserved. That is mercy. God is not a capricious wrath-filled hard core enforcer of punishment. His wrath always comes with mercy. He is merciful and the Jews certainly recognized this.
God's grace is found in His work to secure a remnant and bring them back home to Jerusalem. This was the work of grace that Ezra quickly recognized. God was choosing to bless a people for His great name's sake. He was causing them to grow and to thrive. He was restoring their lives. And it was mercy and grace that led Ezra to confess and forsake sin out of love for all that God had done.