So sorry you are going throug this! I know this is a tough situation. I've been there and so have several parents that I know. This happens to many kids during potty training since they tend to want to hold it for some reason. I know you don't really want to hear about ways to treat constipation (since you feel the constipation may have stopped) but it is possible that the root of the problem could be physical and has, in turn, resulted in a problem with your daughter's behavior. Going to the bathroom has been painful for her in the past and she doesn't want to experience that anymore. Can't blame her! The only way to change her behavior is to change the physical problem that is causing it. She has to experience going to the bathroom pain-free before she will stop being afraid. I think you have to focus on the root of the problem which is the CAUSE of the constipation.
You can try Mirilax, etc. to soften her stools but that only treats the symptoms. In my experience, it could be dietary. Rather than add in more foods, I believe some foods need to actually be removed. She may have some food intolerances or allergies. I finally figured this out for my kids when they were 5 and 8 so I hope you don't have to wait that long! :) I went to many doctors who said, "Add more whole wheat," which only made their constipation worse. Gluten (and sometimes dairy) seems to be the worst culprit. Gluten intolerance (or sometimes Celiac disease) is a genetic condition and there are many other symptoms associated with it that may run in your family. If you want to read about this condition, here are some articles that may help.
http://yourtotalhealth.ivillage.com/constipation-children...
http://www.uchicagokidshospital.org/pdf/uch_007934.pdf
I'd be happy to answer more questions if you want to give this a try just to rule it out. Constipation can come and go with this condition that is fairly common. It was the only thing that worked for my kids. When I removed the gluten, their eczema and stomach aches went away as well. I took it out of my diet and elieved my thyroid problem, skin rashes, canker sores, muscle and joint aches, etc. Take care and hang in there. :)