The diet, in order of preference in quantity, should look like this
whole fruit, beans and peas
Whole grains no yeasted breads, dry cereals or anything refined
Seeds and nuts, but cut out seeds if you have any diverticulosis.
A little tofu or tempeh daily
A little high quality soy or coconut milk yogurt
The soluble fiber in this strategy will stabilized colon function in about 6 to 8 weeks, then about 2 or three helpings of animal foods a week, preferably fish, can be added back.
See the book Eat to Live by Dr. Joel Fuhrman, for instructions on this type of diet.
In addition, you are bound to be low in magnesiusm.
If serum levels are under 2.5 you need supplementation.
Also vitamin D needs to be checked.
Also thyroid and adrenal function.
I would suggest you see a functional medicine doctor for further such measurements, and usually natural treatments to correct the problems.
Find a good list here