Stop hitting it! You'll only worsen the existing problem, which is probably a 'dry joint'. Is it still in warranty?
If not, take it to someone who knows what they're doing. Ask local musos to recommend an amp tech.
Look after your gear and IT will look after U, an' that!
Failing that, buy a big lump hammer for a pal and get him/her to thwack it on demand when it plays up.
The choice is yours . . .
Thewlis, January 2009