The gemara cites a braisa that says a kohen gadol is makriv korbanos as an onen but doesn't eat from the korbanos. R. Yehuda argues and says that although min hatorah he can be makriv as an onen, m'drabonon we don't allow him to because we are afraid he is going to come to eat from the korbanos. Only at night where his status of aninus is only d'rabonon would we allow him to be makriv because we won't make a gezeira that he will come to eat since the issur of eating itself is only d'rabonon (Tosafos). The gemara then challenges R. Yehuda from the mishna where we see that even though the kohen gadol's wife died that day so he is an onen, he is still makriv. The gemara responds that Yom Kippur is different because no one is eating so we aren't concerned that he would eat. At the end of the sugya, the gemara challenges why we are assuming that the kohen gadol in our mishna is actually an onen since we have established that in the event of her death, he divorced her retroactively. The gemara answers that although he is not technically an onen, but אטרודי מי לא מיטריד - he is in a confused and distracted state.
The gemara is very difficult, why does the gemara assume that even though the kohen gadol isn't technically an onen, we would make a gezeira that he may come to eat from the korbanos. Since he is not an onen, who cares if he eat the korbanos? Rashi explains that for the eating of kodshim there is a requirement of simcha - כדרך שהמלכים אוכלים. Since there is a requirement to eat the kodshim with simcha, he would be violating this if he were to eat, therefore it would be appropriate to not allow him to do avoda since he may come to eat from the korbanos (if not for the fact that it was yom kippur and no one is eating).
The Cheshek Shlomo (Rav Shlomo Vilna) cites the Mishna L'melech (Avel 3:10) who is me'supak whether the eating of kodshim in the state of טרדא, but not actual אנינות, would be only an issur d'rabonon or even an issur d'oraysa. The Cheshek Shlomo says that he doesn't understand the question. If the concept of טרדא would only be d'rabonon, we shouldn't make a gezeira to prevent the kohen gadol from doing the avoda because he may come to eat, just like we don't make the gezeira at night since aninus at night is only d'rabonon. The fact that we are gozer that he can't do the avoda because he may come to eat proves that actualy eating in the state of being ta'rud of the wife that he was married to (and just divorced), would be the violation of a d'oraysa - למשחה, כדרך שהמלכים אוכלים.
Although according to Rashi's learning of the gemara the cheshek shlomo seems to be correct that the fact that we make a gezeira shows that actually eating in a state of tirda would be a violation of a d'oraysa. The Tosafos Yeshanim has an entirely different approach to explain the gemara's answer of אטרודי מי לא מיטריד. The gemara is not trying to create a new problem with eating, rather the gemara is trying to explain why we would be concerned that he would eat even if he is not an o'nen. The gemara is saying that since he is so ta'rud and distraught over the loss of his wife, there would be reason to make a gezeira that he may come to eat on yom kippur and violate the issur of eating on yom kippur if we allow him to be makriv korbanos. In other words, the sevara of ta'rud does not need to create a new issur of eating kodshim. It is clearly assur to eat because we are speaking about yom kippur. The sevara is just to explain why we thought to make a gezeira that he will come to eat on yom kippur if we allow him to be involved in korbanos, which is normally not a concern. Based on this approach there is no concept at all of ta'rud being a violation of למשחה - כדרך שהמלכים אוכלים.