Near the end of 42, after Martha says goodbye to the remaining crew and enters the Tardis, the Doctor has a very unhappy look before recovering and giving her the Tardis key. Why? If it weren't the Doctor, I could imagine it would be jealousy for her long kiss to a crew member, but he never seemed concerned about other companions' romances or showed any but the usual interest in Martha. She joked that the Doctor's help hadn't really been necessary after all, but that doesn't seem like enough to so badly upset him either.
This is a recurring theme for the rest of Ten's tenure: he misses Rose.
This is the point in the show where The Doctor is going to make Martha an official companion, by offering her a TARDIS key. Remember that, even though this was Martha's seventh episode, up until that point The Doctor had not actually asked her to come with him. He had offered her "one free trip" (to meet Shakespeare), which become "one to the past, one to the future" (to New New York) then a "detour" (to the Daleks in Manhatten), etc.
It's pretty obvious that The Doctor is looking for excuses to keep Martha around, while still insisting that he's taking her back home at the end of each episode. It's only at the very end of The Lazarus Experiment (the episode immediately before 42),that he finally gives up that pretense and asks her to join him permanently.
But, remember, this is the first time he's had a permanent companion since he lost Rose into the parallel universe; as we'll see later on when Donna joins, and even in one case the Eleventh Doctor, his loss of Rose haunts him for a long time. He's been trying to "move on" from Rose for a while by 42, but that's almost certainly what he was thinking about when he was holding a TARDIS key ready to had it over to another companion -- "am I going to lose this one too?".