Attending one's own funeral was not something he randomly decided to do.
The Earth Federation required a flag to unite everyone.
And a dead Jiang Chen was far more valuable in this respect than a living Jiang Chen. If he died, then all of his blemishes in history would be written off, and all his past acts of war that were criticized by the international community would be re-interpreted as positives.
After all, others could not interpret a man who sacrificed himself for the entire humankind, even at the cost of a blown up Mars, as selfish based on his past actions. He could just see farther than everyone else and understood more deeply the meaning of war between civilization and civilization...
Of course, these would be left for the historians a century later.