Tziduk Hadin (Hebrew: צידוק הדין, "Justification of [Divine] Judgement") is a prayer recited at a Jewish funeral, immediately after the grave has been filled. The prayer affirms that the Divine Judgment is righteous and perfect. It is followed by Psalm 49. It is not recited on various holidays.
The text of the prayer is as follows:
The Rock, His work is perfect, for all His ways are justice; a G-d of faithfulness and without iniquity, righteous and just is He. The Rock, perfect in all His works. Who can say to Him 'What have You done?' He rules below and above, He brings death and restores life, brings down to the grave and raises up from there. The Rock, perfect in all His deeds. Who can say to Him, 'What do You do?' You Who says and fulfills, do undeserved kindness with us, and in the merit of him [Isaac] who was bound [on the altar] like a lamb, hearken and grant our request. Righteous One in all His ways, O Rock Who is perfect, slow to anger and abundant in mercy, take pity and spare both parents and children, for to You, O Lord, pertain forgiveness and mercy. Righteous are You, Lord, to bring death and to restore life, for in Your hands are entrusted all spirits. Far be it from You to erase our memory. Look towards us with mercy, for Yours, O Lord, are mercy and forgiveness. A man, whether he be a year old, or whether he lives a thousand years, what does it profit him? For is it not as if he has never been? Blessed be the True Judge, Who brings death and restores life. Blessed be He, for His judgment is true, as He scans everything with His eye, and He rewards man according to his account and his judgment. Let all give praise to His Name. We know, Lord, that Your judgment is right. You are righteous when You speak and pure when You judge, and none shall question Your judgments. Righteous are You, Lord, and Your judgments are just. You are the True Judge, Who judges with righteousness and truth. Blessed is the True Judge, for all of His judgments are righteous and true. The soul of every living creature is in Your hand, righteousness fills Your right and left hand. Have mercy on the remnant of the flock under Your hand, and say to the angel of death, ‘Hold back your hand!' You are great in counsel and mighty in action, Your eyes are watching all the ways of man, to give man according to his ways and according to the fruit of his deeds. That is to say that the Lord is Just; He is my Strength, and there is no injustice in Him. The Lord has given and the Lord has taken. May the Name of the Lord be blessed. He, being compassionate, pardons iniquity, and does not destroy; time and again He turns away His anger, and does not arouse all His wrath.
- Zalman Goldstein "The Burial" Chabad.org http://www.chabad.org/library/article_cdo/aid/368092/jewish/The-Burial.htm