I'm hesitant to recommend anything, not knowing your medical history. Typically, for this type of ailment you could take one of the NSAID type medications, such as Ibuprofen, Diclofenac, or Voltarol dispersible tablets. However, as with all NSAIDS, they can have profound impact on your gastrointestinal system, leading to severe heartburn and ulcers.
As this clearly is repeating, perhaps a relaxant such as buscopan would be prescribed by your doctor, that you could take when required. Have a word with the pharmacy, but please consider seeing your GP!
I wish you every success
Fr Bill