He was also a demented psychopath. He probably understood that if he survived the war, he would surely not survive the aftermath. Imagine what it must be like for a narcissistic psychopath to lose total control over his life, doing nothing but waiting for his ultimate fate which would be determined completely by outside forces. By orchestrating his own death, he also took it upon himself to orchestrate the death of his wife/lover. Gotta control as much as you can.
Himmler controlled his own situation too by taking his own life in prison, oddly with the help of an allied prison guard, as I recall.