In point-blank range, is Winston's melee preferable to his gun?
Solution 1:
Melee attack does 30 damage and Winston's Tesla does 60 DPS
A melee attack takes one second, so no, it's not better to use melee - stick with the gun.
Solution 2:
It's better to use both.
As Иво Недев noted, the Tesla Cannon does more damage per second than a melee attack, however it is very unlikely that you fight an opponent with only 60 HP.
By using Tesla Cannon and then melee hitting instead of reloading you could possibly finish off a low health enemy instead of having to reload (1.5 seconds of no damage), allowing you to maybe get that kill in faster.