Simple, he didnt lose the person he loved. He actually killed everyone except for the person he loved who he let live, which was directly against orders, and then asked Hiruzen to take care of him not allowing him to know the truth about the Uchiha. He then lived his entire life as a spy dying a martyrs death just to protect the person he loved closest, even planting a few traps for anyone who would attempt to hurt said person after his death. Itachi loved his little brother, since he never lost his brother he never went evil.
The same story could be said for Sasuke who loved his brother, in a weird way. He started off by loving him so much that he hated what he had become and strove to "make things right" then goes on to avenge him.