Daniel's prayer came to mind.
Daniel 9:1-19 WEB
9 In the first year of Darius the son of Ahasuerus, of the offspring of the Medes, who was made king over the realm of the Chaldeans, 2 in the first year of his reign I, Daniel, understood by the books the number of the years about which Yahweh’s word came to Jeremiah the prophet, for the accomplishing of the desolations of Jerusalem, even seventy years. 3 I set my face to the Lord God, to seek by prayer and petitions, with fasting and sackcloth and ashes.
4 I prayed to Yahweh my God, and made confession, and said,
“Oh, Lord, the great and dreadful God, who keeps covenant and loving kindness with those who love him and keep his commandments, 5 we have sinned, and have dealt perversely, and have done wickedly, and have rebelled, even turning aside from your precepts and from your ordinances. 6 We haven’t listened to your servants the prophets, who spoke in your name to our kings, our princes, and our fathers, and to all the people of the land.
7 “Lord, righteousness belongs to you, but to us confusion of face, as it is today; to the men of Judah, and to the inhabitants of Jerusalem, and to all Israel, who are near, and who are far off, through all the countries where you have driven them, because of their trespass that they have trespassed against you. 8 Lord, to us belongs confusion of face, to our kings, to our princes, and to our fathers, because we have sinned against you. 9 To the Lord our God belong mercies and forgiveness; for we have rebelled against him. 10 We haven’t obeyed Yahweh our God’s voice, to walk in his laws, which he set before us by his servants the prophets. 11 Yes, all Israel have transgressed your law, turning aside, that they should not obey your voice.
“Therefore the curse and the oath written in the law of Moses the servant of God has been poured out on us; for we have sinned against him. 12 He has confirmed his words, which he spoke against us, and against our judges who judged us, by bringing on us a great evil; for under the whole sky, such has not been done as has been done to Jerusalem. 13 As it is written in the law of Moses, all this evil has come on us. Yet we have not entreated the favor of Yahweh our God, that we should turn from our iniquities and have discernment in your truth. 14 Therefore Yahweh has watched over the evil, and brought it on us; for Yahweh our God is righteous in all his works which he does, and we have not obeyed his voice.
15 “Now, Lord our God, who has brought your people out of the land of Egypt with a mighty hand, and have gotten yourself renown, as it is today; we have sinned. We have done wickedly. 16 Lord, according to all your righteousness, please let your anger and your wrath be turned away from your city Jerusalem, your holy mountain; because for our sins, and for the iniquities of our fathers, Jerusalem and your people have become a reproach to all who are around us.
17 “Now therefore, our God, listen to the prayer of your servant, and to his petitions, and cause your face to shine on your sanctuary that is desolate, for the Lord’s sake. 18 My God, turn your ear, and hear. Open your eyes, and see our desolations, and the city which is called by your name; for we do not present our petitions before you for our righteousness, but for your great mercies’ sake. 19 Lord, hear. Lord, forgive. Lord, listen and do. Don’t defer, for your own sake, my God, because your city and your people are called by your name.”