The best thing to do is to use a PID to control the temperatures. For the mash, you'll recirculate the mash water thru a RIMS tube. The tube has a hot water heating element screwed into one end and a temperature probe on the other. You use the PID in conjunction with a solid state relay to fire the element in small bursts. The computer uses an algorithm to figure out exactly how often to fire the element in short bursts to bring liquid to a set temperature without overshooting, and then to maintain that temperature. You just program in the temperature you want and the PID handles the rest. It runs about $40 for the PID. Check out Auber instruments.
Here's a shot of mine. The RIMS is holding the temperature to the set point temperature. You can see it's pretty accurate.
Do a search for "RIMS for Dummies." Not a comment on you, just the title of the thread. They have everything from parts lists to a complete wiring diagram.
As for the HLT, I don't think you really need a PID. I just monitor the temp and manually shut it off. In such a large volume of water you can fairly easily get it to the right temp, or stir and let it cool down a minute if you overshoot.