You can take medication if you need to, aspirin or tylenol or whatever you would normally take for headaches or minor aches and pains.
Drinking plenty of water is a good thing. Be sure you salt your food. And be sure you're eating enough at each meal and making your meals match the meal template, including having some healthy fat in each meal. You can download the template here: https://whole30.com/pdf-downloads/
I'm so sorry you're going through such bad sugar withdrawals... but I'll tell you straight-up that there's NO WAY I would've survived the first few days of my first W30 without OTC pain meds. Even if medication is a last resort, please don't make yourself miserable if you can't find relief with natural options.
That said, some things you might want to try are...
Temple/scalp/crown massage, especially if you can put your hands on some good essential oils. I typically mix a few drops each of rosemary, peppermint, and lavender into about a half-tablespoon of carrier oil, then massage that into my scalp and all around the "bony perimeter" of my head. This works even better for me if done right after a warm shower, so my scalp pores are open wide.
Aromatherapy, either with a diffuser or by putting a few drops of essential oil on a piece of jewelry, at your wrists, etc. You can just Google "essential oils for sugar cravings" to get a ton of results. While I've never personally used my EOs to combat cravings, I do know a few people who have done so, and it's definitely helped them through the process.
Skip fruits and any "sweet" veggies (like roasted sweet potatoes or butternut squash) for the first week or so. This might seem like it's counter-intuitive, but trust me when I say that it's so much harder to actually get past those cravings if you cater to them with a sweet food, even semi-sweet fruits and especially dried fruits. If the withdrawal is hitting you hard, I truly suggest hitting back with all you've got by backing away from anything that feeds your sugar dragon enough to keep it alive and kicking... starve the beast, then enjoy the fruits of your labor (pun intended) once it's sleeping.
Also, keep reminding yourself that this is temporary. Not only is the program itself a relatively short-term thing, but your body's withdrawal symptoms should also be fairly short-term as long as you don't prolong the process (see the note above about skipping fruits and the like until your dragon is dreaming). You can do this, but yes it sucks while you're in the middle of the detox.
This list is not intended to be exhaustive, but does include a few ideas that have helped me and a few of my friends. Good luck in finding something that helps take the edge off the cravings for you.