Interestingly, the Stropkover Rebbe, Rabbi Avraham Shalom Halberstam, a descendant of the Shinover Rebbe, quoted (in a speech in Los Angeles on Saturday Night, 7 Shevat, 5767) a similar Midrash (Exodus Rabbah §8) that says that when King Solomon inaugurated the First Holy Temple, he met some difficulty squeezing the Holy Ark, which was ten cubits wide into the Holy of Holies, whose entrance was also exactly ten cubits wide. In order to remedy the situation, King Solomon called upon the merit of his father, King David, so that HaShem should perform a miracle and save him from great embarrassment. He brought the coffin of his deceased father into the Holy Temple, whereupon his father, King David, arose from the dead (although, see the parallel to this Midrash at Yalkut Shimoni, Prophets, §193 which does not mention this detail).

Based on this Midrash, Rabbi Halberstam reasoned that the decree that all humans are destined to die is specifically if one is alive, then he is supposed to die, but if one already died and has been resurrected, there is no decree that he should ever die again. Therefore, he explained that after King David arose from the dead, he was alive and furthermore, he shall continue to live because the limits of human mortality do not apply to one who already experienced death and returned from the dead.

This explains the interpretive anomaly in the contrast between Jacob and King David, for regarding Jacob's state of living, the Talmud simply says (Taanis 5b, See Rashi to Genesis 49:33 who proves this based on the connotation of a scriptural verse), "Jacob, our father, did not die." In contrast, a popular refrain declared by the Jewish Nation for many generations, as a source of inspiration through many trying times, states, "Dovid Melech Yisrael Chai V'Kayam, meaning, "David, king of Israel, is alive and enduring." (This phrase is not only found in popular songs, but is a liturgical part of many joyous occasions (such as Kiddush Levana and its grouping with the phrase Mazel Tov).) Jacob simply did not die, but King David not only remains alive, but continues to live and will never die.

I think an explanation might be that the Gemara says David never slept more than "sixty breaths" in a row so that he would not taste the taste of death (sleep is considered 1/60 of death), so he always remained in the category of "living"

The Rama (426:2) quotes Rabbeinu Bachya who says that David's kingdom, which is compared to the moon, will renew itself like the moon; and the Jews will return to their husband, G-d. The Mishnah Brurah (in the Bi'ur Halachah) quotes the Pri Chadash to the statement in Rosh HaShanah 25a that this was the message that they sent.