So since posting this thread I've thought of a few different ways to fix the celestial death ray.
1. Lower the damage
This is probably the simplest solution, and the easiest to balance, but maybe not very creative or fun.
2. Decrease range significantly
This would allow for some counter-play to the celestial death ray, and would help prevent getting hit by 3 of them all at once upon entering a battle. It would also make it less likely that all death rays target the same ship, preventing the near-instant death they sometimes cause.
3. Make it much less common.
A single celestial death ray can be dealt with (by focusing on the ship that has it), the real problems only start when facing at least two (and especially 3+) celestial death rays at once. This also makes it less likely the player ends up with 2 or 3 celestial death rays, making the game too easy.
4. Make the it require lots of upgrades to be extremely powerful.
This makes it much less likely the AIs end up with multiple powerful death rays, but allows the player to use a powerful death ray if they invest a lot of upgrade points.
5. Make the death ray "overheat" and damage its own ship
This way, the celestial death ray would still be very powerful, but it could have a significant drawback.
The description could say something about the weapon being so powerful that it overheats and damages the user.
It could create some interesting builds using lots of shield or hull repair drones to compensate for the self-inflicted damage.
This might not fix the problem of entering a battle and dying in an unpreventable way to multiple celestial death rays though. It would probably have to be made less common too.
6. Make the death ray drain it's own ship's shields in order to fire, and unable to fire if the ship has no shields
Similar to #1. This would make the death ray a powerful but risky weapon to use, and would open up a clear counter-strategy. It would have interesting synergy with shield repair drones. The description could say that the weapon needs so much energy to fire, it has to draw energy from the ship's shields.