It should be fairly elementary in most cases to get it right concerning "I," "me," "he," "him," "she," "her," "they," and "them." Weren't we always taught to use the one that would sound right if the partner word were left out? Example: "Heather and I are going to the grocery." "I am going to the grocery." Ok, that was too easy. How about, "Jay is going to the grocery with Heather and me"? The test: "Jay is going to the grocery with me."
Now let's look at some slightly more difficult situations. "I don't know who is going," but, "I don't know whom he is going with" (or "I don't know with whom he is going). Reduce such situations to the clauses that the pronouns are immediately parts of. ". . . Who is going," but, ". . . with whom he is going." If you're not much into "whom," substitute, say, "him" for "whom" and "he" for "who." Thus "I don't know whom she killed" can be analyzed, ". . . she killed him (not he)"; so it's not, "I don't know who she killed." Further, "Whom she killed is lying in the closet." Again "she killed he" is clearly wrong; likewise "who," strictly speaking, is incorrect. Try this one, "Ben is the one who (or whom?) I thought did it." "I thought" is unnecessary or parenthetical; leave it out and test: "Ben is the one who did it." That's right, "I thought he did it," certainly not "I thought him did it."
Most of us know to answer the phone request, "I'd like to speak with Tom," with "This is he." On the other hand, when the police coming looking for Jake, folks usually say, "That's him!" Be consistent. The construction is the same. Say, "That's he!" Oh, yeah, you'll probably shake up the policemen; but, hey, this is a grammar discussion, not a criminology lesson.