Notice how Dovid HaMelech did the most unheard-of evil, being Nichshal with an: אֵ שֶּ ת אִ יש married woman and killing her husband!!! Although Chazal teach us that: כָּל הָּאוֹמֵר דָּוִד חָּטָּא אֵינוֹ אֶּלָּא טוֹעֶּה (שבת נו א) Dovid never did any sin whatsoever; the people of his generation (Shim'i ben Gera) didn't believe so! Dovid was criticized for his sin publicly, and he had to defend himself. When they embarrassed him for what he did, he said: One who sinned with an: אֵ שֶּ ת אִ יש married woman is: מִיתָּתוֹ בְחֶּנֶּק put to death in Bais Din with Chenek (strangulation) and nevertheless gets Olam HaBah. But: הַמַלְבִין פְנֵי חֲבֵרוֹ בָּרַבִים, אֵין לוֹ חֵלֶּק לָּעוֹלָּם הַבָּא one who embarrasses his friend in public loses his Chelek in Olam HaBah. (Gemara).
And Chazal say that only after his Petira did the Velt find out the truth about him; when the gates of the Aron HaKodesh refused to open, and they only opened up when Shlomo said: ה' אֱלֹקִים אַל תָּשֵב פְנֵי מְשִ יחֶּיךָ זָּכְרָּה לְחַסְדֵי דָּוִיד עַבְדֶּךָ (דהי"ב ו מב). Do it for my father, Dovid. Imagine the greatness of Dovid where his own nation thought he was a total bum, a: נוֹאֵ ף sinner and a: רוֹצֵ חַ murderer! This is real Malchus! A Melech has Hish'tavus (whether people like him or hate him is “equal” to him) and doesn't care what people think; only what Hashem thinks is important.
How can we understand the Hashgacha that our Melech should do such a low-life action? Actually, a Melech has to be on top of everyone, and only a Baal Teshuva is truly on top, because: בְמָּקוֹם שֶּבַעֲלֵי תְשוּבָּה עוֹמְדִ ים אֵין צַדִ יקִים גְמוּרִ ים יְכוֹלִין לַעֲמוֹד (ברכות לד ב) Baalei Teshuva are even GREATER than pure Tzaddikim! I heard from a big Mekubal that the power of Teshuva makes your sin (which is a live Malach who is: מְ קַ טְ רֵ ג disparages you in Shamayim), into a live Malach who is a: סַ נֵ יגוֹר advocate for you. And the worse the sin, the bigger and more powerful is the: סַ נֵ יגוֹר defending Malach.
The true Melech is the selfless person who inspires people with plenty of hope to do Teshuva, even on the worst sins. But if you have any brains, don't even dream about even committing the smallest sin (אֵין מַסְּפִיקִין בְּיָדוֹ לַעֲשׂוֹת תְּשׁוּבָה, חַ ס וְ שָּ לוֹם). But if you already sinned, or feel addicted to unwanted habits, suspect that you have Malchus in you, and by doing Teshuva, you'll inspire thousands of others.
