Ouch!! :-o Sorry. You are supposed to clamp the barrel in a vise, close to the end of the barrel/flash hider, when doing such work. With protective covers for the vise jaws of course....aluminum, nylon or thick leather. A proper barrel vise block is best. It may not have felt like a lot of torque but as you apply the torque, it ends up being a lot down the other end. Locating pins in anything are typically not designed to take a lot of side force. They are most often hardened steel. When a hardened pin is in a hard metal, they usually shear or even shatter rather than bend.... when subjected to a lot of force. If the locating pin fits into hard metal on one side and soft on the other....like aluminum....rather than break, they can tear up the aluminum they locate into something fierce and gouge things up badly. Often a mishap like that is even worse.
That locating pin is only about 1/8" diameter right? It wouldn't take a lot to break it. All it's supposed to do is index the barrel to the upper. Hopefully Spikes will see you right. Is the hole clear or did one half of the sheared piece break off flush? It may have to be drilled out. If it all came out the fix is easy....get another pin. I've even heard of people using 1/8" drill bit shanks in a pinch.
It shouldn't be too much of a big deal....just a PITA and a most unwelcome stoppage to your progress. All the best with it, hope you get it fixed soon and for cheap.