You need to give yourself a method of distraction or reinforcement to remind you that it's just your brain fighting you on cravings. Is the hardest part of battling addiction because your conscious mind knows what's going on but brain chemistry is unfortunately brain chemistry and that's what needs to change.
Your agitation is likely secondary to needing a mechanism for venting and not being able to turn to the usual.