Yes, you would say "on" in this context but your mother's surgery is a subject which is on your mind. Doubts are thoughts which are "in" your mind.Yes, but wouldn't you say,
"You've been on my mind all day"?
When someone is on your mind, it means you are reminded of them as you go about doing other things.
"I couldn't concentrate on my test; my mother's surgery was on my mind the whole time I was trying to finish the third part."