I think that you have a severe muscle spasm that is impinging on a nerve which is causing your pain. This makes sense since it is worse in certain positions and with deep breaths.
However, a more worrisome cause should be excluded, thus I do recommend a visit with your doctor to check your heart and lungs
and exclude something more worrisome.
Then if it does turn out to be nerve pain from a muscle spasm, you could possible try muscle relaxants, massage, trigger point injections, physical therapy
, or other modalities to help it. Most of the time it will go away with time although you can speed up the relief of your symptoms with these modalities I mention above. In the meantime, you can continue over-the-counter pain medications, stretching, and warm compresses or a heating pad to see if those things start to help a little bit.
If you get any shortness of breath, severe or new chest pain, or any other concerning symptom, I suggest you be seen immediately in the ER.
Hope that helps, but please let me know if you have any questions.