The night before roasting, in a small bowl, mix together the butter, lemon zest, thyme leaves, rosemary leaves, and pepper.
Blot the chicken dry with paper towels and place it breast side up on a rimmed baking sheet. Use your fingers to gently loosen the skin and separate it from the meat, making sure not to puncture or tear the skin. Tuck the butter mixture under the skin, press the skin back in place, and rub to spread the butter evenly over the meat.
Cut the reserved zested lemon in half and tuck it inside the cavity, along with the thyme and rosemary sprigs. Sprinkle the salt evenly over the top and sides of the chicken. Refrigerate uncovered overnight.
Preheat the oven to 450°F.
Gently brush away any undissolved salt on the chicken. You can either roast on the baking sheet or in a large cast-iron skillet. If using the baking sheet, blot away any liquid accumulated on it. Position the chicken on the baking sheet or in the skillet so that when the pan goes in the oven, the breast will face the back of the oven and the legs will face forward.
Rub the garlic halves all over with olive oil and arrange them cut side down around the chicken.
Roast for 45 minutes, then brush or spoon pan juices over the chicken. Continue roasting until an instant-read thermometer inserted into the thickest part of the thigh (without touching bone) registers 165°F, 5 to 10 minutes longer.
If the skin on top is not as browned as you like, remove the chicken from the oven, set the broiler to high, and place the chicken under the broiler until the top skin is browned and sizzling, 1 to 4 minutes. Watch carefully so that it doesn’t burn.
Let the chicken rest for at least 10 minutes before carving. Serve the halved garlic heads alongside the chicken and let diners squeeze out the roasted garlic.
Store leftovers in a covered container in the refrigerator for up to 3 days.