Pain in the chest could be due to many non-cardiac conditions (that is not related to heart problem). Many common causes include, muscle spasms, pinched nerve causing radiating pain, ribs fracture, post herpetic Neuralgia (condition with happens during herpes lesions and pain may last for days to many months even after the skin lesions heal.
The pain in these situations could be treated with titrated doses of special analgesics and/or some interventional procedures depending on the cause.