Not to disappoint you, but it took me over a year + to get rid of my case of costochondritis. However I was able to train a month later with variations (1-2 board press/floor press instead bench and most importantly I lowered the volume and percentages) and two months later I could train normally. The first month was the worst and I couldn't do any pressing movements at all.
At this time I was too very frustrated and visited my local Chiro, and after his examination my 4/5th ribs were out place, which didn't allow the ribs to rise and lower properly during inhalation/exhalation which caused the inflammation. He did a few adjustments to put the ribs back in place and also did some ART on my pec to release pec minor.
I went to a general MD - they gave me some anti-inflammatory too, but I did not feel they helped, which was probably because my ribs were out of place.
Although I was able to resume normal training 2 months later (benching to chest)- I couldn't do parallel bar dips/any fly movements till a year later without any discomfort. During that year I would get a flare up here and there if my volume for pressing movements were to high. All I would do was take 2 Aleeve (500mg naproxen) and Ice my sternum 10 mins on 10 min off, alternating with heat and in a few days I was ready to go again. This was 2 years ago and very rarely I sometimes feel that pain when doing dips at the bottom of the movement, but other than that I'm all good now.
My suggestions are:
-see a chiro as its possible you have the same thing going with your ribs
-modify your lifts to avoid aggravation (generally rehab principle)
-hot and cold
-lower the volume when you are able to train normally again so you don't go backwards
-like the other guy said - work on thoracic mobility (extension and rotation) as generally everyone has bad thoracic mobility from sitting for prolonged periods of time. Just youtube thoracic ext/rot drills/exercises and I think you will be good to go.
I hope this helps, and I know it sucks - but you will get better.