There are two ways to get a 9mm pistol. The easiest is to pick it up from the cottage in the bottom right corner of the slums. The pistol always spawns here and you can get it right after the game starts or at any other time you see fit.
The second way is to lockpick police vans. They can be found on highways.