Are you able to take some photos of the cage and animal so we can figure out what your problems are. Just by the description of your tank, I can tell you its all wrong for acclimating a peachthroat monitor. Poor setup for just about every reptile even.
As for your vet, he/she gave you meds without figuring out the true nature as to why your animal is the way it is. Peachies come from very hot and humid places,so the conditions of your cage will play a big part into 'fixing' your monitor. Right now, your lizard is like a fish out of water.
3ft to 3.5 ft is about right for a peachie. They can get bigger though. You will need a pretty big enlcosure by the time you are done with your research. I hope you know what you got into.
Right now, I would cover the open mesh so the little heat and humidity that you do have doesn't escape so fast, dehydrating and causing your animal to get even more sick. Foil, wood, glass, plexi are all good 'blanket' fixups for now.
Get the hotside of the 40 gal to be in the 90's and coolside of high70's and low 80's. If you don't have a temperature gun, you will need one to figure out the surface temps of the basking site. You want the surface area to be 120 .
The humidity in your cage will range from 50 to 60% around the basking area, all the way to 70 and 80% in other places. Providing options is very important in reptile husbandry, and though it'll seem a little difficult in a 40 gal(very hard for me,anyways) you will be able to rig the cage a little bit.
You will for sure need to give it moist bedding as well and a bunch of hides.
does the animal eat?
Hope to see some pics. Good luck.