This should make the fight easier
You are correct that the xp allocation is similar between four 3rd level characters and eight second level characters. Be careful of things that could kill a 2nd level character outright (including using too many monsters). When the levelup occurs the party will be full-power 3rd level characters and the enemies will have, in theory, taken a few scrapes.
But none of this is the real problem.
This will draw out the game and interfere with pacing
Even for the most veteran party, levelup takes tens of minutes. Combat is already the lengthiest individual part of the game and your suggestion is going to add at least fifteen minutes, likely more.
I've forgotten to level up (I assume we all have) and only realized it when I needed a roll and it's very distracting; I don't get to enjoy what's going on the same way and I'm certainly not an engaged player. It's like talking to someone that's playing on their phone. (in case you were thinking of keeping the clock running, so to speak)
I highly discourage this. I understand what you're envisioning, but that's not how it's going to play out. There's no quick WoW-style "ding" to be had here.
If you're set on surprising your players with some sort of dramatic rallying effect, I would personally start throwing advantage out like it's candy (and use the XP guide for four level 2 characters). I haven't done this, so I can't speak to it, but the PHB tells us:
The DM can also decide that circumstances influence a roll in one direction or the other and grant advantage or impose disadvantage as a result.
and "a power within awakening" seems a lot like a circumstance that would grant advantage.
Alternatively, as Mołot pointed out in a comment, if you don't care about it being as much of a surprise, you can have them bring levelup'd sheets with them. Either tell them what it's for or be a little more vague about it "You guys might level up before the end of the night, and it'll speed things up to have it done ahead of time." You run the risk of people
blowing it off forgetting to do it, but it's about the same as people not being prepared for the game in the first place.