Here we have an example of a dialogue tag interrupting the single sentence of the dialogue itself. Some writers who have no trouble inserting the tag between sentences don’t know what to do when there’s only one sentence to work with.
The way the original is written, “Which is worse” is a statement, not a question, and “Emotional pain or physical pain?” is a sentence fragment. This doesn’t work.
“Which is worse,” she wondered, “emotional or physical pain?”
Notice the first word after the tag is not capitalized, and the period after wondered has been changed to a comma.
(Just so you know, wondered isn’t the same thing as asked; the latter implies that the speaker is addressing the question to someone else and wants an answer, whereas the former is often just thinking aloud.)