Erik hadn't given up hope either, not completely, but that last kernel of it had been buried deep, he knew better than to leave it anywhere that Shaw might see it. He'd given up on being rescued, yes, he had long since realized that this was something he'd have to do himself, but he had to wait for the opportune moment, and the longer he stayed, the less chance of an escape happening there was and he knew it.
So he was still there when the cavalry arrived, but finding him was going to be another story, the hideout wasn't large, but it was labyrinthine, especially in the lower levels where Shaw's test subjects were kept, and Erik was definitely one of those. Kept well and away from any plumbing or electrical wiring or anything else that he could use to his advantage.