The verse (Tehillim 32:10) states: “Many are the pains of the wicked, but as for him who trusts in the Lord- kindness will encompass him.”
Reb Mendel of Kotzk explained that the difference of the wicked and the righteous is primarily in perspective.[1]
A wicked person is consumed by negativity and sees pain no matter what happens to him; while the righteous—who trusts in G-d—experiences the same things, but sees them as kindness.
[1] Emet MKotzk Titzmach, Pg. 42