Would be interesting to see what result crunching the numbers on that would turn out.
Assuming Malekith gets trapped between two arbitrarily large hordes of Flagellants, this would allow eighteen Flagellants to attack him at a time.
The six Flagellants in base contact get to make two attacks each thanks to Frenzy, while the remaining twelve can only make one supporting attack each, for a total of 24 attacks. They hit on 5s against Malekith's WS8, but get to reroll thanks to End is Nigh (With an average of 3,5 Flagellants dying per turn from self-flagellation) so 24x0,555=13,32. They wound Malekith's T4 on 3s thanks to being armed with Flails and have a 66% chance of rerolling to wound which works out to about 81% chance to wound on average, resulting in 10,8 wounds. The flails negate Malekith's armour save, but his 2+ Ward against nonmagical attacks brings it down to 1,8 wounds on the first turn.
Malekith makes 4 attacks a turn that hit on a rerollable 3+, thanks to his WS8 and Always Strikes First (or Eternal Hatred, take your pick), for 3,555 hits. Malekith has S5 and Flagellants T3 with a 33% chance of being T4 each turn, or about a 77% chance of wounding per attack, so he kills 2,7 Flagellants per turn.
The Flagellants have ranks and rear attack bonuses to combat resolution so Malekith most likely loses combat, fails his Break and gets overrun by Flagellants. However, that's not interesting so we'll assume Malekith passes his leadership test. Flails drop to S3 from second turn onwards, meaning 48% chance to wound Malekith and consequently 0,703 wounds dealt per turn, meaning it takes the Flagellants on average three turns to kill Malekith. In that times, 10,5 Flagellants have committed suicide, and Malekith has killed 8,1 with his melee attacks.
However, this is the absolute best scenario for Flagellants possible under WHFB rules, and most of Malekith's items are not kitted out for fighting hordes (The Destroyer and Supreme Spellshield do absolutely nothing, for an example). Also Malekith is a wizard, and while I refuse to go through the math of rolling for his spells, rolling for the Winds of Magic turn by turn, determining how many spells he gets off on average and calculating how likely he is to kill himself with a Miscast, with Malekith's +5 to cast and the Circlet of Iron adding extra power dice I feel like it's reasonable to assume that he can get a Soul Stealer off every turn (assuming that he managed to roll it, which is about 64% chance since Malekith knows 4 spells), at which point he can kill an arbitrary amount of Flagellants unless he gets highly unlucky, because Soul Stealer allows him to heal wounds faster than the Flagellants can on average hurt him. He will probably eventually suffer enough wounds on the same turn or roll a bad miscast and disappear into the realm of chaos, but I really cannot be assed to calculate that. Or he could use Bladewind, which inflicts a S4 hit on every model in the target unit, and since we're using arbitrarily large units of Flagellants for this thought experiment, he kills an arbitrary amount of Flagellants. Or Word of Pain to nerf their strength and make it nigh-impossible for them to hurt him.
Too Long Didn't Read: In melee, Flagellants kill more of themselves than Malekith does. If he's allowed to use magic, he can on average heal himself faster than they can hurt him so he keeps going until he flubs his rolls.