Can the mind be trained to maintain equanimity in the face of compulsive urges/cravings (without giving in / acting out)? Are there any practices or habits that one can employ, either frequently or on a daily basis, to train one's mind to remain still and equanimous in the face of compulsive urges or cravings, without giving in to them / acting them out?
Can this skill be developed in a general sense, applicable to all types of urges/cravings, or does one need to train a different, tailored technique to handle each type of urge/craving individually?
Please refer to my answer on "How can I forget my old girlfriend?"

Urges and cravings come up because we seek sources of external energy. We assume that these things can give us something: make us happier, elevate us, entertain us. So all these cravings even though they seem different are really cravings for one thing - energy. However, if you look at them really carefully you will see that obtaining these things does not give large amounts of energy for a long time. It's like browsing Facebook: we hope we will see a post that will be interesting, educating, motivating, and will improve our day - but most of the time we just keep scrolling and scrolling, and most of the posts don't give us more than a few seconds of joy, so the entire experience is very frustrating. But we still keep craving, funny huh? Because we are so confused!

The real source of energy is only our own strength. Giving in to the urges will never give enough energy. Only authentic challenges that we really believe in can give us what we are looking for. So the only way to obtain that energy that we crave for is to sit down, meditate, and see what we really want deep inside. Which personal weakness we want to overcome to get something we dream about. Then go ahead and overcome that weakness and achieve that goal. That will give you energy that will be real, and all small urges and cravings will be so obviously hollow comparing to that, that they will all subside by themselves.