I had a bad coughing episode rendering me temporarily unable to breathe and had sharp pains shooting in my upper chest. It was very scary. What was happening? I also had some sharp pains shoot through my head. Both disappeared once I was able to breathe again.
Thanks for your question on Chat Doctor. I can understand your concern. In my opinion, you are mostly having acute bronchitis. It is viral infection of large airways. It causes bronchospasm and this in turn causes chest pain, cough, breathing difficulty etc. So better to consult pulmonologist and get done clinical examination of respiratory system and PFT (Pulmonary Function Test). PFT will not only diagnose bronchitis, but it will also tell you about severity of the disease and treatment is based on severity only. You will mostly improve with antibiotic, inhaled bronchodilators and other supportive Chat Doctor.  Hope I have solved your query. I will be happy to help you further. Wish you good health. Thanks.