Ratchet thought he was hallucinating after get back on the ship with Drift and needed to check if there's something wrong with his cornea, but as it turned out, he didn't have to do that once the old doctor confirmed that it was really you
— the one he have been looking for long time
It's you, who he believed died along with his feelings for you
You disappeared during the Great War and were listed as MIA, as you are his friend and someone with whom he has deep feelings. He had to suppress the urge to abandon his duties and go out to find you, he would even cross to the other side of the galaxy just in the hope of finding you, but it wasn't that easy
It goes without saying how Ratchet realizes and regrets what he didn't do and in a similar situation but it's Drift instead of you, Ratchet chose to do things he would not regret later
As well as the feeling of relief and pleased to see you again, he couldn't help but feel guilty creeping out from the bottom of his Spark – How shameful and pitiful it was that he couldn't do the same for you, which he hoped he would