What I want to write is formal, or polite version of
what the hell are you talking about?
A reason why I can't use this is beacuse a person who's saying this is a middle-aged man, and he's not likely to say something like "what the hell.."
And I know I can just remove "the hell" and go for "what are you talking about?", but it's too simple compared to what I initially wanted to say. I don't know what exactly "hell" means here, but I know it does have some impolite, negative connotations. But here, he isn't being that offensive. He's kind of emphasizing what he had just heard is a total nonsense.
Is there any expression which is a formal version of "what the hell are you talking about" in English?
Or is there any good word that can replace "the hell"?