While more difficult to prove then physiological or dietary causes of constipation, I have read, and believe, through personal experience, that depression can cause constipation, as can the reverse (constipation cause depression).
Check out the book "The Chemistry of Joy" by Henry Emmons. While it focuses on depression, some of the dietary and other life style suggestions are interestingly in line with some of the choices I have made (through studying and professional guidance) to address my IBS and specifically, my chonic constipation.
Hope you find something helpful from this!