You are pregnant 5 months and Chest pain which you are having is not Heart attack
These are atypical pain which you may be having because of Acid reflux
in to the food pipe,or just a muscular pain
because of distension of abdomen.
These kind of pain you may avoid acidity and reflux by taking small and frquent meals .
if more problem may take ranitidine
like drugs in consultation of Gynaecologist.
Muscular pain may respond to hot fomentation or local application of diclofenac
You can practice deep breathing exercises .
If iny kind of doubt take an ECG to see everything is normal.
Good Luck to you.