I have never heard of the connection and I personally don't have any mental disorder other than the fact that past UC symptoms caused enormous stress, but that was normal. Who wouldn't feel enormous stress when their bowel cannot be trusted?
My first thought, because you mentioned being allergic to dairy, is that food sensitivity can create many personality changes, especially in children. I never had food sensitivities until UC came to roost but since being successful on the Specific Carbohydrate Diet I have seen so many positive results, the most notable of course is recovering normal bowel function.
I'm not a scientist but have read enough to know that just because "A" is present and "B" is present doesn't mean "A" caused "B" or the reverse. UC alone is such a frustrating disease, adding bi-polar would make things even more complicated.
In remission April 2010 after 10 years of suffering and no remission ever
Jan 2010 started SCD diet (modified to remove dairy, fruit & juices)
Gluten-free=bleeding stopped in 3 days, 95% remission in 5.5 months on SCD
at 5.5 month stage homemade yogurt, hard cheese and some fruit OK
SCD Diet: Gluten/grain-free, starch-free, low carb, low-sugar
Supplements: tsp. fish oil, Vit D3 5000 with oil/fat, veggie juice, sunflower seeds, VSL#3, (4) Citrucel, (1) turmeric capsule, (1) calcium
Highly recommend: the book "Life without Bread" and the Specific Carbohydrate Diet
Rx: (6) balsalazide daily, mesalamine enema occasionally