Oh god OP I really feel for you, my DD just turned 2 at Christmas and from the start of October until after Christmas we had the same issues as your poor DD.Its a horrible situation and so hard to watch.
My DD started off badly constipated, not going for 2, 3 days, then when she did go the stools were very hard and large, and painful for her to pass. We were prescribed lactulose but like you were given very little direction on how often or how much to give.
The situation escalated until she was only going every 5 days but at this stage she was with holdind due to the pain she had experienced at the beginning of all this.
When she did start to feel the urge to go, it was horrendous, high pitched screaming, bright red face, sweating, and this could go on several times throughout the day as she wouldn't let 'go' - and I can't blame her - it was awful to watch.
Eventually she would go, one of us would have to hold her close and you could feel her little tummy muscles in spasm, as if they could no longer hold and were just overcome with the need to go!
She was also prescribed Movicol during this process but I had no success with getting her to drink it no matter what I mixed it with, so we concentrated on diet, lots of water, and lots of Lactulose! We gave 10ml 3 or 4 times a day.
I was dreading the thought of beginning to use suppositories but thankfully our doc agreed that it would be too traumatic for DD as she was already afraid of pain in that area!
Time is your biggest friend I'm afraid, our doc did say it could take months to get back anywhere near normal but thankfully we are making some headway now.
Now DD will go every other day at least and there doesnt seem to be any pain for her now, she will sometimes panic when she feels the urge to go and run to us but then it's over before she realises.
I was also afraid of this causing issues with potty training but I'm just going to hold off on this until the summer and she's already excited about getting a Minnie Mouse toilet
and big girl pants so I'm hoping there will be no long lasting issues.
I really hope you see some changes in your little one soon, its just awful to watch and you feel so helpless!
Sorry this is so long winded but it was awful and I really sympathsise with you.