So the main thing that I remember is that it's a Cultivation novel but in the initial chapter there is a battle between what I believe is the mc and and a godly undead. The mc is the only one in the jade palace with formations to block the undead figure and his army but at the same time the mc seem despondent in his defense. In the end he reincarnated after damaging the undead