I can't seen the picture but here is what I would do for two possibilities:
A. If you have a large hole in the wall that won't be covered by the new thermostat, I cut some small pieces of one by material that I can stick into the hole and are long enough to overlap on either side of the hole. You screw them to the backside of your drywall above and below the hole on both sides letting the wood overlap into the hole area. This gives you a place to screw your patch too. Cut a drywall patch out of drywall and screw it to your boards you installed as backers. Tape and mud the joint all around and sand smooth. Retexture to match if you have texture. Depending on what type of texture you have, there are dozens of techniques to get it to match. Finally paint and install your new thermostat. The backer boards that you used to install your drywall patch also provide a good place to screw into for your thermostat.
B. If you just have a lot of stripped out screw holes in your drywall from previous installations, simply buy a small container of joint compound at your local hardware store, fill in the holes and sand smooth. Paint, texture and install your thermostat.