Op I'm so sorry, how awful for you :(
I agree that you should try to continue with work as much as possible and avoid taking time off sick if you. I don't think it would be unreasonable to take a long weekend if you need it but explain to your manager that its a one off and you need a little extra time at the weekend to sort some things out re the split.
Definitely see your gp anyway - take all the support they offer to manage anxiety and sleep etc. I would also look for counselling to help you find your way through the messy shock and emotional fall out.
If you dd can stay with her grandparents for a weekend to give you some space to let loose your emotions I think this would really help. You need a bit of air to let loose your shock and pain without having to be responsible for your child.
I would look at work as a grounding place and something to anchor you during this awful time and then really up your self care out of it, even if that means just doing nothing.
Don't let your ex screw up your new job just because he's thrown a grenade into your life.
Panic is a normal emotion when your world has been turned upside down, its your bodies way of knowing that you need to act but not knowing how. Its a response to shock to tell yourself if its OK to feel this way. Let the feelings come in their waves and wash over you, take a deep breath and think of the next little thing that you can do. It will help stop you getting paralysed by fear.
Obviously if your mental health is really dreadful and hitting crisis point then you need to prioritise it and if it comes to a choice between that and sick leave you need to do whats necessary.
In the interests of your job and not taking sick leave...
Get easy to cook things in - ready meals, one pots, slow cooked dinners, or meals cooked for you by family and friends that you just take out the freezer to bung in the oven.
Get some fresh air as much as possible - a walk or time in the garden if you have one every day if you can. Focus on getting the best sleep you can.
Try and carve out some time each day before bed to sit and be with your thoughts and emotions so that you don't get into bed and have them all circling your mind preventing you from sleeping.
I hope these don't sound empty platitudes but from experience I know how when your world has been blown up like that and you have to carry on, its so important to find ways to protect your health so that you don't break completely. I'm not suggesting for a minute they'll make everything better, just that, however pointless they may seem at first, they can help you manage things. With everything you know rocked, establishing a new routine that prioritises emotional,physical and financial security does help.
You will get through this and things will get better. 