The Gun does more damage the closer the Officer is to its target which at point-blank range is more than a normal melee weapon such as a Baseball Bat, but this is countered by its reload time, which leaves the Officer prone to attack.
For these reasons, it may be of little use during Room invasions, but may be more useful for attacks in bigger places, such as like the mini-boss battle with the Impostor and in the Basement as there is more space. Keep in mind, the damage when further away is smaller than when closer.
Additionally, the Gun does not count toward the one-weapon rule, meaning, like the SWAT, the Officer is free to pick up any melee weapon to cover the potential weaknesses of the Gun.
Overall, the Officer excels in ranged combat, and if it obtains a melee weapon, it can be a solid fighter.