If my mind is racing I end up turning on the light and reading for a while and try to empty my head. The other thing as mentioned is relaxation ideas. There is a technique for breathing called 478. I used it when stressed. Link below hopefully explains it.
http://www.drweil.com/videos-features/videos/the-4-7-8-breath-health-benefits-demonstration/It's a difficult time. Know that it does get better. Hope everything goes well with surgery. Know we are here to listen.
Kath x