In my experience, a "pang" is just a sharp [sudden] pain, while a "spasm" is an involuntary contraction of a muscle. " I suppose you've checked your dictionary for "spasm" by itself. I've heard the expression "coughing spasm," which I believe is also involuntary.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.