The sensation you're describing is a learned (by the body) startle reflex triggered by the sharp, stabbing pain, which is almost never cardiac in nature (although it can, as you've noted, occur with pericarditis). Your pain seems to be fleeing, however, and while it's remotely possible you could have pericarditis again, it is probably something simpler like costochondritis, an inflammation of the cartilage between the ribs where they join the sternum. This often responds well to the same medications as pericarditis (Advil, Aleve, etc.). However, many times people with sleep disorders develop an exaggerated startle reflex, which is certainly consistent with your sleep study findings.
The medication you were on before was probably Buspar (generica name busparone). It is often good for mild chronic anxiety, but is on the weaker end of the spectrum.
If you're using the CPAP mask now, over a period of time your body may "unlearn" this startle reflex, but some people have it even without sleep apnea, and sometimes a medication like Buspar is helpful with this sort of thing. If not, there are other, more effective, antianxiety drugs available. Hopefully the unlearning of the reflex will come with correction of the nighttime breathing interruptions.
Hope this is helpful to you. Good luck to you with this.
John Kenyon, EMT, CCT
Non-invasive cardiology tech, Emergency and Critical Care technician, Critical Incident Stress Mgmt. specialist