Pain 'is good for heart attacks'