during the table scene in season 4 eren attacked and pushed away armin and mikasa to protect them yes yes. but ever wonder what kind of gratification eren felt when armin hit him first? - because armin was fully willing to give his life during the battle at shiganshina, in fact he got himself cooked alive with the complete understanding that he wouldn’t make it. everything would be fine if eren made it to the sea one day.
reason being we are all aware of eren’s imposter syndrome. he broke down on the rooftop when he was pleading his case to save armin because armin’s intentions were always pure - eren lost his way and started seeking revenge. eren didn’t deserve armin’s sacrifice. he truly believed (and… very minor spoilers believes) that armin can save everyone.
it was made clear multiple times before season 4 that eren fuxking hates himself for being weak and powerless against the powers that be that were taking away “humanity’s” freedom.
so there was gratification in his self-sabotage at the table scene (even though he WAS acting/lying when he said he hated mikasa) for proving that armin’s love for him (platonic or not idc) wasn’t infallible. eren knew what he was going to do because the timeline of aot is linear and the course of his actions couldn’t be altered; so it was partly to punish himself too.
and as it all has to do with mikasa, maybe eren beating the shit out of armin was major overkill because even after telling her he always hated her, she was betrayed but never hostile towards him in that moment or resented him any time after. she was the very last person to be convinced that they needed to kill eren and even then she hated the idea. in paths when everyone was yelling to get eren’s attention, whenever mikasa spoke and requested to share his burden with her… eren finally addressed them.
similar to erwin and levi… eren could retain a slight fraction of his humanity because of mikasa.
which makes eren’s later claim to armin during their last conversation… and the place eren made with mikasa… fully cement his true feelings for them.