As has been noted many times on these boards: Paramount would not meet Robert Duvall's payment terms to appear in GFIII. So, in GFIII, Michael mentions that Hagen died. He never identifies the cause of death.
You are right about the dichotomy in how Michael speaks fondly and respectfully of Hagen in GFII, and treats him badly. Michael played Hagen like a violin. Hagen was Sonny's contemporary, not Michael's. Sonny, not Michael, brought him into the family. Vito, not Michael, chose him as consigliere. So, Hagen was always more than a little unsure of where he stood with Michael, especially after Michael told him in GF: "You're out, Tom."
At the beginning of GFII, we see that Michael deliberately excluded Hagen from his most sensitive dealings with Roth. But, after the attack on Tahoe, Michael needed him to look after his family because, whatever else, Hagen was loyal, and at that point, Michael couldn't be sure of anyone else's loyalty. So he made that wonderful speech about how he loves Tom, always regarded him as a brother, etc. Hagen practically collapsed with relief. But, as soon as Michael returned from Havana, he no longer had to depend on Hagen, and was abusive toward him.


Ntra la porta tua lu sangu � sparsu,
E nun me mporta si ce muoru accisu...
E s'iddu muoru e vaju mparadisu
Si nun ce truovo a ttia, mancu ce trasu.