Don't panic.
Some folks can't tolerate the regular Metformin and have the slow release version instead, this doesn't upset stomachs so much.
Try taking the tablets at a slightly different time, either before meals, during or after. I take mine a bit before my meal as if I took it during or after the meal it made me feel a bit sickly.
Regarding the bowel problems and headaches. Are you drinking plenty of fluids as Metformin tends to dehydrate sometimes. When I first started taking it I got headaches if I didn't drink plenty of water, coffee etc during the day.
I also had constipation problems initially, I think it has something to do with the change in diet and reduction in carbs. My system settled down after a while and I regularly add flaxseed to homemade muesli or the fruit and Soya Yoghurt I have for breakfast which I think helps.
Hope this helps.
Regards
Angie