After Aria's death, Elijah realised how much he had cared for her, and thought about the things he should have done. But it was too late now, they hadn't done those things, and she was gone.
He fell into a deep downwards spiral of self blame, self hate, grief, and eventually diagnosed with severe depression.
When she returned, everything was the same, except she wasn't a deviant anymore. Most of her memory had been wiped or partially damaged in either uploading to the cloud, or whilst uploading them to her. And he was more distant than ever. All that, just because he didn't want to be hurt again.
《Part three of the three part Connecting series》
Clara is the Doctor's salvation. She's perfect for him in every way. The Doctor needs her in his life. He just doesn't realize how much until she is dead. But he isn't letting go so easily. He will bring her back, even if he brings unspeakable consequences with her. The Doctor never did like endings.