Why does it say "Zacharti Mishpatecha me'Olam"?
Radak citing Ibn Ezra: It is the judgments that You did with intentional sinners like them.
Radak: I remember judgments that You brought against good people in past years, and afterwards You brought great good on them.
Malbim: I remembered that You conduct everything with Mishpat.
What consoled him?
Rashi: You bring afflictions, and retract from Your anger, and forgive.
Radak #1: [I expect that] You will do to [those who mock me] like You did to [previous] Zedim.
Radak #2: Just like You brought judgments against good people, and later brought great good on them (refer to 119:52:1:3), so You will do to me.
Malbim: Since You conduct everything with Mishpat, "Ulai Yir'eh Hashem b'Eini v'Heshiv Hashem Li Tovah Tachas Kilelaso ha'Yom ha'Zeh" (Shmuel II, 16:12).