Pele Yo'etz on Mesira
The Pele Yo'etz's entry on Mesira:
The statement of Haza"l is known about one who gives over judgement to Hashem (see Rosh Hashana 16b) about his friend, that his heavenly notepad is checked and he is punished first. And this is something that is common in the mouths of even the uneducated masses and the lowly ones, who would say, "Hashem should punish the evildoer according to his evil." And if they were wise, they would be wise to the fact that Hashem told him to curse. And When a man's ways please the LORD, He maketh even his enemies to be at peace with him. (Mishlei 16:7) Wherefore doth a living man complain, a strong man because of his sins? (Eicha 3:39) And what does he gain by cursing his friend and giving over judgement? Such a person causes evil to himself more than what his friend did! Therefore, Let him sit alone and keep silence, because He hath laid it upon him. (Eicha 3:28) And Hashem will seek out [to help] the victim without [humans] giving over judgement to Hashem.
And there is another type of Mesira that Haza"l were very stringent about so much so that they allowed killing the informer and saving yourself with his soul (see Bava Kamma 117a in the ארי עלה מבבל gemara). This is referring to a case of one who gives over the body or money of his friend to the Aku"m [government] without permission from a Beit Din. And a Jewish man should tremble and fear from doing this and should not commit [spiritual] suicide, Has Veshalom. And it is worthy for all city leaders to open their eyes about this, and to break the straying of this evildoer (?) with all their power and all their might. And there should not be like this or anything similar to this in Israel for the sake of the holiness of Israel. And about this and anything similar to this, it is worthy for Jewish men to give over their souls for the sake of sanctifying Hashem, as is said about the early sages, to whom a miracle occurred for them because they gave over their souls to sanctify Hashem. The zeal of the LORD of hosts doth perform this (Yeshaya 9:6) just as Pinehas, the zealot, the son of the zealot, has done. And he called it "Hashem Shalom". (Shofetim 6:24)