I think this is a scene not from "Ender's Game", but its sequel "Speaker for the Dead". In a thoughtless moment Ender turns off the connection to "Jane", the AI consciousness that is bound to him, and she is deeply hurt by this.
So when he reached up to his ear and turned off the interface for the
first time since he had implanted it, Jane did not feel it as the
meaningless switch-off of a trivial communications device. She felt it
as her dearest and only friend, her lover, her husband, her brother,
her father, her child-- all telling her, abruptly, inexplicably, that
she should cease to exist. It was as if she had suddenly been placed
in a dark room with no windows and no door. As if she had been blinded
or buried alive.
And for several excruciating seconds, which to her were years of
loneliness and suffering, she was unable to fill up the sudden
emptiness of her topmost levels of attention. Vast portions of her
mind, of the parts that were most herself, went completely blank. All
the functions of all the computers on or near the Hundred Worlds
continued as before; no one anywhere noticed or felt a change; but
Jane herself staggered under the blow.
In those seconds Ender lowered his hand to his lap.
Later she forgives him, and indeed retreats into herself to rebuild the damaged pathways of her mind, to make herself into someone who can bear to be parted from Ender. Here is the full quote:
He is innocent of wrong-doing, and so am I. We shall forgive each other and go on.
It was a good decision, and Jane was proud of it. The trouble was, she couldn't carry it out. Those few seconds in which parts of her mind came to a halt were not trivial in their effect on her. There was trauma, loss, change; she was not now the same being that she had been before. Parts of her had died. Parts of her had become confused, out of order; her hierarchy of attention was no longer under complete control. She kept losing the focus of her attention, shifting to meaningless activities on worlds that meant nothing to her; she began randomly twitching, spilling errors into hundreds of different systems.
She discovered, as many a living being had discovered, that rational decisions are far more easily made than carried out.
So she retreated into herself, rebuilt the damaged pathways of her mind, explored long-unvisited memories, wandered among the trillions of human lives that were open to her observation, read over the libraries of every book known to exist in every language human beings had ever spoken. She created out of all this a self that was not utterly linked to Ender Wiggin, though she was still devoted to him, still loved him above any other living soul. Jane made herself into someone who could bear to be cut off from her lover, husband, father, child, brother, friend.
It was not easy. It took her fifty thousand years, as she experienced
time. A couple of hours of Ender's life.