Try taking some Magnesium Citrate to help with BM and headache.
Also to help with BM...a combination of Miralax and Milk of Magnesia (which is also a different form of magnesium)
Milk of mag is the mover, Miralax is only a softener.
Drink lots of water
Hi and welcome to the Migraines & Headaches Community.
You need to see your PCP for follow ups. They should have told you that at the ER.