When Shim'i ben Gera cursed Dovid he didn’t kill him, but instead he used this Chutzpa positively; and Shim'i became Shlomo’s Rebbe. Shim'i was the perfect Rebbe for a Ben-Melech, since such a person isn’t afraid to give him Mussar. And indeed, right after Shim'i’s death, Shlomo married Bas Paroh.
And by saving Shim'i, Mordechai was born, and Mordechai used this fearless Chutzpa against Haman HaRasha. For this reason, Chazal say that Mordechai is called: יִדוּהְי שׁיִא Ish Yehudi [i.e., from Shevet Yehuda, even though he was really from Binyamin] since Dovid [who was from Shevet Yehuda] was the cause of Mordechai’s existence. A true Yehudi is a Baal Hoda'ah appreciative person who is constantly thanking Hashem, and seeing good in all “bad” situations.
Chazal say that from Ani'yim Davka will come forth Torah. So don’t put yourself down because of your need to struggle in Torah, Kedusha, or Bain Adam La'chaveiro etc. אָרְגַא אָרֲﬠַצ םוּפְל אבות ה כב The reward increases according to your effort, and those who struggle are our front-line soldiers. Despite their “heavy casualties” [and Aveiros], they protect the rest of Klal Yisroel.
