I don't think it's official but it's highly speculated that the **** word was kill when he got hacked by Adam. So the kid had problems even before he saw 2B die. Then there's the scene with all the 2B models. I think he had it in him the whole time and seeing her die just pushed it over the edge...