Working with ex husband

I was married for 7 years we have two kids. We have always worked at the same place but in different departments. Well through our divorce he decided he would move to my department that I had worked at for 11 years at the time. Now he’s everywhere I turn. We divorced because our relationship was so toxic and affecting our children. We ended up just resenting each other and always competing who was better at what, such a childish marriage. Well now I am forced to work with him everyday. He is a loud know it all who loves attention. He has everyone eating out of the palm of his hands and thinking he is God. It makes me sick!! I hate my job now because of him, what would y’all do in this situation? I have a really good job and worked hard to get where I am , but feel like working around him is going to drive me insane!! I could never find a job making what I make now, it’s a wonderful job, so hard to just let it go. My boss pretty much said we have to work together and can’t keep us apart. I’m just at a loss . After we split I had to go to a rehab for mental health because he was so manipulative and told me over and over he wished I would just kill myself and how awful of a person I was and I believed him because I believed everything he said for 7 years. So I tried to do it and knew I had to go get help for my children because they needed their mom. I feel like im stuck in such a horrible situation, and im miserable . Do y’all have any advice ??