Go see your Dr or pharmacist about your heartburn - you can take Zantac, well I have been, but check with them regarding your specific circumstances. also try and stay away from anything too acid or irritating - OJ, tomatoes, Indian etc

I would maybe even take some panadol?

I know it is best to avoid drugs unless you really really have to but you sound so miserable I think you need some extra help. IMO if you are completely miserable it does nothing for bub.

Have you seen a physio about the pelvic pain? I had Sacro-iliac pain from about 14weeks, it got really bad around 20 weeks I saw a physio have been doing my exercises they gave me and it is so much better. It still hurts at times but I know to rest it and wear my brace if going to be doing anything that will trigger it. Some days I am pain free! Of course I am not exercising or doing anything too much - besides housework and the usual.I found a body pillow helped too. Mine is just a straight one from Kmart around $50, includes a pillow slip.

Chocolate is medicinal too

I hope you can get some sleep and feel better soon. Everything is just so much harder to deal with when you are tired.