To temporarily fix a well pump that only works when the tube under the pressure switch is banged on, you can restore the electrical contacts by opening them and filing off any burned or pitted areas using a nail file or emery board. However, this fix is only temporary, and the pressure switch should be replaced as soon as possible.