Next time it happens take a deep breath and hold it until it is uncomfortable. Slowly exhale. Then take a bunch of small breaths pausing in between each and do not exhale until your lungs re full. Won't clear the cough but you can control it with breathing.
Go back to the doctor and ask/demand for a chest xray. I had the same exact thing happen to me earlier this year, everything cleared up but the cough. I am now in the hospital for my second round of chemo because it ended up being lymphoma. Go get an xray to make sure its nothing more than a nagging cough.