Could you explain further why "in" needs to be between "anger" and "much" in order to be correct?
First, here's the correct version of the sentence.
Scientists have found new evidence that people initially register emotions such as sadness or anger in much the same way as they experience heartburn--by monitoring what's going on within their bodies.
Now, here's a stripped down version of the relevant clause.
People register emotions in the same way as they experience heartburn.
At first glance, this seems to be an idiom about the correct preposition to use with the verb register, but it's not. Rather, the relevant structure here is W Xs in the same way as Y Zs, where W and Y are subjects and X and Z verbs/clauses. (W Xs in the same way that Y Zs is also acceptable.)
I'm going to call this an idiom. I don't really see any powerful larger logic here, any non-idiomatic reason that we need the in here, but we do. Curiously, though idioms are usually easier to determine in stripped down sentences, in this case I find that the idiom is more obvious when the word much is left in.