This could be because of costochondritis. Need to rule out cardiac causes first by consulting with a physician.
For Costochondritis nothing much to do. Hot fomentation(care must be taken not to burn yourself) will give relief. Local application of voveran gel(any substitute gel). Avoid strenuous activities (avoid GYM chest exercises) for 3 weeks.
Health Tips
Rule out cardiac causes - consult a physician. If cardiac causes are ruled out by physician then there is nothing to worry about, do not fixate on it.