How can I stop the guards of Megaton from killing me?
I have made mistakes like this in the game too and usually if I leave for a while and return much later everyone returns to friendly mode. If you only pick pocketed then it could be a glitch.
Leave the town for a few days, then come back. They should calm down.
See this for reference: I accidently made the Underworld aggro. Will they ever calm down?