Hypothesis On Why Sombra Went Nuts · 2:16am May 31st, 2014
His brain was warped because the magic he was using drew too much power.
Suppose Unicorn Magic is (somewhat) like electricity. A unicorn is a combination generator/capacitor. The unicorn's horn is a combination telekinetic manipulator and Spell Effector.
A Unicorn's Horn is optimized by their cutie mark to be able to use spells related to their talent (save for Twilight, whose talent is magic, thus any spell has minimal draw). This does not, however, mean a unicorn can't use spells not related to their talent. They just use a greater amount of power than usual. Example: Trixie could probably dowse for gems like Rarity, but she would have to use a greater amount of power to get the same effect.
Sombra was using what is apparently called Alicorn Magic. This, to me, sounds like Unicorn Magic cranked Up to Eleven. Sombra was using magic not just outside of his Talent, but far outside of his safe power draw. He essentially forced too much power through the magical conduits connecting to his horn, causing the insulation of these conduits to fail, leading to magic 'shocks' compounding the warping of his mind.
Still, it doesn't justify his actions, considering he used this magic to prevent his kingdom from (completely justifiably) overthrowing him.