Detox from headache med

Please no judgement, but I have beentakjng 2-4 tablets of Fioricet daily for the past 3 or 4 months. I didn't realize how dependent I was - I found myself scared it would get too bad and I wouldn't have anything else to treat the migraine with. I was wondering if anyone has had similar problem and detoxed off and what they did for the headaches during the withdrawal as I am 8 weeks pregnant? OB is aware and we are working on a plan. Just looking for advice.