I would suggest eliminating all wheat products from your diet. Do a search about "gluten Intolerance" and I would also recommend searching "lactose intolerance." These are two of the most misdiagnosed conditions in the USA. Doctors hear of you symptoms and almost instantly say IBS.
The good thing about the above problems is you can find out for yourself without paying doctors. It is very difficult to do but if you are consistent you can find out for sure in about one week.
The problem with gluten intolerance is gluten is in EVERYTHING. All bread, cake, pasta, medicines, croutons, condiments, tooth paste, beer. Good luck and let me know.
Because you are experiencing pain, I would suggest you see your doctor, particularly with a gastroenterologist who specializes with the problem sof the colon, which could be your problem. I would also let him or her know about your frequent urination.
Best of luck to you!