Sci fi story in older book collection of short stories. Paperback.
That's "Dynasty of One", a short story by James White, also the answer to the question Galactic Emperor has immortality, but at a price. You must have read it in the James White collection Futures Past.
Advanced civilization with a ruler who has to pass a test to continue to be ruler.
". . . The Just, the All-powerful, the All-knowing, His Celestial Majesty, Tate the First!"
He sat down.
Nobody moved, anywhere. This was no ordinary function, where he granted audiences or issued the decrees which could alter the destiny of whole stellar systems. This was the time when he had to prove his fitness to rule, or die. In utter silence he pressed one of the two studs set in the arm of his throne, and tried to relax as golden bands of beautifully worked metal closed around his limbs, chest, and head, holding him rigid.
As the person walks to the platform in front of a crowd, he passes by an aquatic alien delegation. He remembers a tragedy happening to the aliens and feels regret that it was his fault.
Helgach, Tate thought as he paced, outwardly calm and unafraid, between twin rows of beings who bowed low at his passing—or, if physically incapable of that form of obeisance, twisted or twitched their respect in some other way. It had happened two hundred years ago, but he still felt guilty about Helgach. And he would feel much worse about it in a few minutes. It was a terrible thing to wipe out a race, to cut the teeming population of a planet down to a mere handful, but he had done just that.
The population of Helgach had been close to four billion. One hundred thousand had survived, thanks to his direct, forceful, and blindly stupid handling of the situation. Now, as befitted the representative of his most fanatically loyal system, Helgach's ambassador occupied a coveted position barely four yards from the throne. Racial memory could be extremely short at times.
The tragedy was that the aliens' sun was going to explode and the aliens being water bound needed help evacuating. Ruler had organized a rescue mission with many starships.
Tate relived that mad dash at the head of the greatest fleet of starships ever known to the Helgach system, the shock tactics which tore the natives from their homes and cities before they half-realized that anything was amiss, and he felt again the almost palpable hatred that struck him because there had been no time to explain. And he felt proud—justifiably, he thought—at thus getting the last of the Helgachians away before their suddenly unstable sun blew itself up.
Everyone thought they were all secure in the stasis water tanks, safe to make the jump to their new home. Upon arrival it was discovered there was a major malfunction with the tanks and half or more of the population died.
But his too-perfect memory was bringing back things which he should have noticed; small indications which could have averted the disaster to follow. If he hadn't been so busy patting himself on the back he might have suspected that the suspended animation tanks were not perfectly suited to their occupants, and he would not have arrived at New Helgach—after a trip half across the galaxy—with a fleet filled with decomposing corpses.
Little over a hundred thousand Helgachians had survived to repopulate their new planet. It was, therefore, much more than politeness that made him inquire the number of the native ambassador's sons.
The test is a chair that makes the candidate relive their past memories and if they live through their pain and regrets, they pass signifying they can handle power and gain more intelligence and live longer.
The radiation which stimulated the regenerative centers produced other effects as well, some of them good, others quite fatally bad. The treatment increased the I.Q., and gave to the mind a perfect, eidetic memory. It also, for the few seconds duration of the treatment, so intensified the effect of what had come to be called the "area of conscience" that any being having sufficient intelligence to base his actions on a moral code had to take three seconds of the most frightful psychological torture ever known. He had to live with the cruel, debased, and utterly nauseous creature that was himself.
Many preferred to die rather than take three seconds of it. Most had no such choice—their life force was obliterated with the first, savage blast of self-knowledge.
This secondary effect of the treatment was experienced as a complete reliving of the past, with each incident diamond-sharp in visual, auditory, and tactile sense recall. But not only that. The mind was given a terrifying insight into the end results of that being's most trivial-seeming actions. Unthinking words or gestures made over the years and forgotten, when blown up by the triple stimulus of perfect memory, increased I.Q., and a hypersensitive "conscience" became lethal as a suicide's bullets. The mind just could not take such an overwhelming blast of self-guilt, even for the three seconds, so it, and the body containing it, died.
Only one person had successfully undergone the Immortality Treatment.
Tate, though he had lived—with thirty-seven previous treatments—for seven hundred and sixty-eight years, still took only three seconds. And there was no blurring or telescoping of events. Each incident was complete, and though it occupied only microseconds of time, each bore its charge of guilt potential.