Is there a source in Judaism that indicates that Moshiach (Ben David, not Ben Yosef) will die before having fulfilled his role and then return to posthumously achieve it?
אמר רב אי מן חייא הוא כגון רבינו הקדוש אי מן מתיא הוא כגון דניאל איש חמודות
Said Rav: If he [Mashiach] is from the living, he is like our great teacher [R' Yehuda HaNasi]. If he is from the dead, he is like Daniel, greatly beloved man [i.e. the Biblical Daniel].
In The Yerushalmi Brachos daf 17:1 (see Eicha Rabbah 1:51 as well ) says : The Rabbanan said if Mashiach is from the living David is his name, if he is from the dead, David is his name,
R' Tanchuma says the reason is based off Tehillim 18:51.
Rabbi Yehoshua ben Levi said his name is Tzemach.
Rabbi Yuden ben R' Aivo said his name is Menachem.
However, it is brought that Mashiach(kingship) will come from Shlomo Hamelech(Rambam Mitzvah Lo Taseh 362 ) ,and it is also brought down that the soul of Mashiach will be from that of Moshe( Ohr Hachaim 49:11 ) Meaning the soul of Mashiach is from great people not necessarily that these people are Resurrected.