All the people who said "We all die!" are correct with good answers, but for most people it won't be the earthquakes that kill them -- they'll already be dead.
The leakage from the radiation beam will be large enough to fry pretty much everything. As it cuts through the atmosphere -- even before it hits the ground -- it will scatter a huge amount of energy, since in order for the beam to cut through 8000 miles of rock it needs a huge2 or even huger3 amount of energy. (This is enough energy to vaporize and disperse a disk of rock 8000 miles in diameter and 40 meters thick in half a second. Note that since it's cutting through the vaporized rock, it needs to push the vapor out of the way so it can keep cutting.)
This xkcd What If on a similar scenario has a lot of hints about what would happen. A small percentage of the radiation will scatter off the air, heating the air to center-of-the-Sun incandescence which will radiate in all directions. This heating will push the air up and out and all that will interact further, creating a shock wave, but more importantly dumping enough energy into the atmosphere to fry things at a long distance (around the curve of the Earth) by reflection off the air. (Also, the "Earthlight" reflected off the Moon will fry that whole side of the planet.)
The huge pulse of vaporized rock produces a shock wave that propagates up through the rock. It's supersonic for a considerable distance, but I can't compute whether it's supersonic all the way to the surface at the point perpendicular to the disk where the rock in between is thickest.
In the meantime, it will take a couple seconds for the gap between the halves of the Earth to close, but the shock of it closing will only travel at the speed of sound in rock, so it will take up to an hour (the speed of a P-wave is 1-8 kps) for the shock to get to everywhere on Earth. Most people/plants/things get fried first.
So highly energetic flash kills nearly everyone, then the supersonic blast wave from the cut from all the vaporized rock blows everyone into the air at high speed and at high acceleration and this kills everyone who survived the radiation. When the debris falls back to fill the 40 meter gap, no one is around to be killed by it.
Added: One of the other answers notes that the effect would be like a huge detonation in the slice, and a couple of them do nice back-of-the-envelope calculations of the size. But these calculations are lower bounds to the actual magnitude, since they assume that most of the beam's energy would be deposited where it was intended, and that is certainly not true -- as noted above, the boiling plasma would scatter the beam and mean that the actual energy of the beam far exceeds what's needed to vaporize the slice under ideal circumstances.
So, a much bigger bang with some incredibly complex plasma physics going on.
We can say a few things. First, near the surface the energy would be more than enough to produce craters -- to blow matter on either side of the slice up and out. Since the slice is a line rather than a point impact, one result would be a furrow -- pretty much the effect you'd get by simultaneously exploding a chain of millions of deeply buried nuclear bombs. But it wouldn't be just a single BANG!, since there would be a continuous outflux of vaporized rock from deeper down. So maybe more like a chain of Mt St Helens eruptions with a long, linear caldera?
Finally, the effect on the far side of the Earth would be much worse, since there the beam would come blasting up from below and super-heated, super-high-pressure rock gas from many cubic miles of rock would burst out, throwing the adjacent rock high -- probably some out to escape velocity -- and continue the furrow, probably even deeper than on the entrance side.
90 degrees away from the slice you'd start with the radiation, then the blast wave through the air and through the rock. As I noted, I expect the effect of the outgoing wave from deep below would be far more devastating than the effect when the material from the two halves drop together.
Under ideal conditions the energy needed to vaporize a 40 meter slice is not enough to disrupt the Earth, since it's not enough to melt the Earth, and total disruption requires more than that. Would the inefficiency caused by the boiling plasma raise the energy requirements high enough that there would be enough energy to melt things? I don't know and I don't think we can easily model it.
But it's certain that a lot of rock would be thrown into the sky and while some would go into orbit or escape, most would fall back over the next few days as a horrendous meteor shower.
It would be interesting to watch. From Mars. With good radiation protection.