The surgery I had last year was nowhere near as serious as what you guys are describing but I was still terrified of it. I'd never even been unconscious before in my life. It was freaking me out a bit.
Ultimately I just treated it all as if I was on a rail, I'd already made my decision I just had to follow the path that was coming, and the surgery itself was 50/50, either I'd wake up or I wouldn't.. and if I didn't I wouldn't know that I hadn't.
I will say that getting mental health help in the past did give me some tools that helped deal with it and stop myself from getting into an internal monologue loop, distract myself. And I didn't journal