[header] How to treat costochondritis [title] Go immediately to the doctor or call emergency responders if you experience chest pain. [step] A medical professional will be able to determine whether it is a heart attack or something less serious like costochondritis. [substeps] Know what to expect at the doctor's office. 
The doctor will likely palpate (examine with her fingers) along your sternum to determine where it hurts and the extent of the inflammation. If she is able to reproduce the pain while palpating, it is likely costochondritis and not a heart attack.