ספר המדות, Mitigating Judgment / Part I Mitigating Judgment / Part I · ד
Sefer HaMiddot 611
ד. כְּשֶׁיֵּשׁ לָאָדָם צַעַר, יִתֵּן צְדָקָה, וְהַצְּדָקָה הֲוֵי כְּמוֹ שֶׁנּוֹתֵן שָׂכָר לָדוּן, וְעַל־יְדֵי זֶה הַדִּינִים נִמְתָּקִים, כִּי הַנּוֹטֵל שָׂכָר לָדוּן – דִּינָיו בְּטֵלִים.
4. When a person has pain, he should give charity. For the charity is like he's paying for the judgment, and through this the dinim (-- defined at the beginning of this entry) are lightened (lit. sweetened). Because someone who takes payment to judge, his rulings are void.