Let's Get Real
Many users on this site get a bit wound up in the physics. You're writing a story. You do not need a scientifically accurate solution. You might not even need a scientifically plausible solution. What you need is a solution with enough science supporting it to allow readers to suspend their disbelief. So, really, what do you need?
Most people don't know about energy density
But they do know about batteries, and increasingly, they know about solar panels. They'll get that you can't run the gun even with the suit being all solar panel, but they'll wonder about what happens when the suit gets all torn up, or dirty, or the skies get cloudy (especially when things that go "boom!" are pushing smoke and debris into the air). It's a tough sell. On the other hand, let's make the gun battery a backback battery and to recharge it I have one word for you, just one word... piezoelectricity.
Piezoelectricity is electricity derived from materials that are under stress. Simplistically, a material is squeezed, and electricity is the result. Put the plates in the soles of the soldier's shoes! Make the flak jacket out of it! And the helmet! Why? Because no war would be fought with only beam weapons any more than it would be fought with only infantry. A variety of weapons are needed, including projectile weapons. Besides, soldiers are suseptible to flying debris ... and every object that hits them helps recharge the gun.
Combine this with a battery of Clarkian nature and we have it made.
The Problem with Heat
You're going to need to deal with the heat issue. I have a phrase I've coined: "technology dichotomy." It describes the tendency for writers to have time machines without their society having first invented the wheel. In your case, the problem is an advanced energy society that will obviously be able to pinpoint a heat source from orbit.
A heat source that makes grandpa's Yuletide fire look like a snuffed-out match.
The most obvious issue here is the heat due to inefficiency, which has already been pointed out by others in answers and comments. The RPG Traveller had the concept of a "cold cannister." (At least it did a million years ago when I was playing it....) It attached to sealed combat armor (like Battledress) and absorbed heat (body & equipment). This seriously reduced the thermal signature of the soldier. When the can was consumed, it was replaced. You're going to need something along those lines... a way to absorb heat or convert it to something more benign.
Enter the thermoelectric generator: a solid-state chunk of awsome that converts thermal gradients into electricty. Add a solid dose of completely believable efficiency and you have dumped a ton of heat. And it will help charge the gun!
But this isn't the only problem with heat: you're pushing a bazzillion-watt whoopin' toward the other dude. That's going to draw a wonderful line of heat with a big ole' arrow at your end that says "kill this guy right here."
And frankly, I've got nothing for this one. If you'll excuse a bit of hyperbole: the air will turn to plasma. It will glow like the Northern Lights. It's actually a really good reason why directed energy weapons may never be popularly used. You could throw a bunch of heat generators out onto the battlefield to try and raise the ambient temperature, which would hide your beams... but you'd lose the temperature differential to get that extra electricity to keep the gun working.
This issue might be insurmountable. Which means you need a distraction. Like mortars sending super-heated BBs into the field. Won't do a lot of damage themselves, but will create a criss-cross of image-confusing thermal lines that might, just might, confuse enemy computers and keep you alive to roast the next guy in line. Yeah.... distractions.
Let those limbs explode!
In reality, a focused energy weapon that had enough energy behind it to kill a person wouldn't boil or explode a limb or a head. Like industrial lasers, they'll cut, not boil. Boiling occurs when heat has the time to propagate through the material, raising the temperature of (e.g.) the pot of water. Apply a high-energy beam and you cut through the water... and the pot... and the stove... because all that energy is in one spot at one moment rather than a lot of spots for a long time.
However, if you're talking about emitting microwaves... your microwave oven heats food by heating water (I'm being a bit simplistic, but it's basically what happens). Pass a high-energy microwave through a human and the water vaporizes. "Boil" isn't the correct word. Nothing would boil... but the jets of steam bursting from his arm and the gooey explosion of his eye when the aqueous humor instantly vaporizes would be satisfying to any connoisseur of B-grade drive-in horror movies!
And by the end of the story, people might not even question the science behind your
Because the goal isn't scientific accuracy... it's suspension of disbelief. All that needs is a good premise.