Based on the hentai manga by Azuki Kurenai.

Did Yamato die in Naruto anime?

Yamato is still alive in Naruto Anime. We all know that Kabuto captured Yamato so that he can use him to create white jutsu army ready as he possessed Hashirama’s cell.
So after Kabuto has done with Yamato white zetsu take control of Yamato’s body & use him in Ninja war against Shinobi alliance.
White zetsu uses Yamato to use forbidden jutsu of Hashirama like 1000 hand deity.
& he stop Ninja’s path. Later when Hashirama caste Infinite Tsukoyomi white zetsu release Yamato but he soon get captured in Genjutsu.
3rd Hokage tried to save him but it was useless. As the 4th great Ninja World war ends everyone is releases from Genjutsu along with Yamato.
& Now Kakashi is 6th Hokage stated in episode 484–5.
& Orachimaru is set free to live in his lab but the who stand to keep eye on Orachimaru is Yamato. So Yamato is not dead in fact.
And Orachimaru can go anywhere he want but Yamato is always tagged with him.
So Yamato is living his life watching over Orachimaru