This is the 19th century Papally-approved prayer I keep laminated in my Roman Breviary to pray before hearing confessions:
Da mihi, Domine, sedium tuarum assistricem sapientiam, ut sciam judicare populum tuum in justitia et pauperos tuos in judicio. Fac me ita tractare claves regni coelorum, ut nulli aperiam cui claudendum sit, nulli claudam cui aperiendum sit. Sit intentio mea pura, zelus meus sincerus, charitas mea patiens, labor meus fructuosus. Sit in me lenitas non remissa, asperitas non severa; pauperem ne despiciam, diviti ne adulor. Fac me ad alliciendos peccatores suavem, ad interrogandos prudentem, ad instruendos peritum. Tribue, quaeso, ad retrahendos a malo solertiam, ad confirmandos in bono sedulitatem, ad promovendos ad meliora industriam: in responsis maturitatem, in consiliis rectitudinem, in obscuris lumen, in implexis sagacitatem, in arduis victoriam; inutilibus colloquiis ne detinear, pravis ne contaminer; alios salvem, meipsum non perdam. Amen.

This is my [probably mediocre] translation of the above Latin prayer to English:
“Grant to me, O Lord, assistance from Your throne of Wisdom, that I might judge your people in justice and your poor ones with with judgment. Make me handle the keys of the kingdom of heaven, that I may never open what is closed, nor close what is opened.  May my intention be pure, my zeal sincere, my charity patient, my work fruitful.  Let there be in me a leniency not negligent, a harshness not severe.  May I never despise the poor, nor admire the rich.  Make me approach sinners with sweetness, questions with prudence, instruction with discretion.  Grant that I may pull people from evil with skill and confirm them in the good with precision, promoting in them greater effectiveness.  May I be mature in my responses, honorable in my advice.  Make me bring light to darkness, wisdom to confusion, victory in strife.  Let me never be detained by useless chatter.  Let me never be contaminated by perversity; in saving others, let me not lose myself.  Amen.”

(With this prayer of the Father-General of the Theatines, Pope Pius IX granted an indulgence of 100 days to all confessors who, with contrite hearts and devotion, before taking their seats in the tribunal of penance to hear Confessions, recite the above prayer. This indulgence may be gained once every day, as appears by the decree of the S. Congr. of Indulgences, dated March 27, 1854. This indulgence may be gained once every day, as appears by the decree of the S. Congr. of Indulgences, dated March 27, 1854.)