I think you mean "Yahiko" not "Yugito"? But, I don't think it was so much because of Yahiko's death, which is why one of Nagato's paths resembled him, but more so the constant wars in which Nagato was tired of. Someone (Tobi) offered him a way to cease all of it, so he just went with it...