Can I ever use that for people, or must it be who?
Which one is correct?
- I have friends from all walks of life that I consider my best friends.
- I have friends from all walks of life who I consider my best friends.
In a sentence like yours, the usage of all three relative words ("who", "that", whom") are acceptable in today's standard English.
BUT, if you are taking a class, either as a native English speaker or as an EFL/ESL speaker, then you'll have to give the version that your teacher expects.
That said: Here's some grammar rationales.
First, let's parse the sentence a bit. The nominal headed by the noun "friends" is modified by the relative clause "who/that/whom I consider my best friends",
Notice the gap ("__(i)") in the relative clause. That gap could sorta be filled by the word "them" (in meaning only, though, not physically), and so, that gap has the function of object in that relative clause. And there is a link from that gap to the relative word "who/that/whom", and a link from that relative word to the noun "friends". They are all linked together.
Now, in a traditional grammar perspective, the expected "correct" answer might be the one expecting the relative word "whom", which is in accusative case. Teachers often want that because a pronoun that functions as an object is usually expected to be in accusative case.
But in practice, using "whom" in your example will make the sentence sound rather stilted. That is, a rather formal style.
Because the relative word is fronted (in front of the relative clause), we native English speakers will very often use the relative word "who" here instead of "whom". The relative word "who" is in nominative case, which is usually the case of pronouns that function as subject in a clause. Since the corresponding gap is not functioning as subject (rather, it is functioning as object), traditional grammars tend to frown on this type of usage.
But in practice, we native English speakers tend to freely use "who" (over "whom) -- except for the most formal styles.
Now as to the use of the relative word "that": we native English speakers also tend to freely use "that" (instead of "who" or "whom") -- except for the relatively more formal styles.
Some modern grammars (such as the 2002 CGEL) would consider the relative word "that" in your example sentence to be a marker of subordination, not a pronoun. And so, that eliminates entirely the old bogus argument put forth by pedants that the pronoun "that" shouldn't be used to refer to people -- and by the way, the pedants were wrong on that point too.
You can get some helpful info, somewhat, from regular dictionaries, in their usage notes on the entry of "that". But some dictionaries also have bad info.
You can get much better usage info on this topic by using a usage dictionary, such as Merriam-Webster's Dictionary of English Usage, in their entry on "that". Their info is readable and easy to digest.
If you're in an argument, er, disagreement, with your teacher on this, then you can get some grammatical support from the 2002 reference grammar by Huddleston and Pullum et al., The Cambridge Grammar of the English Language (CGEL).
Short Answer: You can use either.
Long Answer: As I have said, both are perfectly grammatical. However, there are occasional pedants who will insist that who/whom always be used in reference to people (and sometimes animals) and that/which in reference to inanimate objects. Don't pay attention to them.
As tobyink has stated, whom is the correct form for the given sentence; however, few people will notice if you use who instead.
But why do some people insist that only who/whom, never that/which, can be used in reference to people? The issue has a long history, which began around the time when Old English was becoming Middle English, when its system of inflection was weakening, when it was losing grammatical gender.
Back in the days of yore, one would never say my friends who...; it was always my friends that.. But the word that had more forms to it, which, at least approximately, allowed there to be a distinction between people and objects. Take the following chart:
There was a time when the words in the column marked masculine were used in place of that for all masculine words, those in the column marked feminine for all feminine words, and so on. However, as you can probably guess, all of these forms converged onto the single word þæt, which, unsurprisingly, means that. Because that is etymologically neuter, not everyone felt comfortable about using it in reference to human beings. (Ironically, many Old English words for people were grammatically neuter, such as bearn 'child', cild 'child', cwen 'woman', folc 'nation', and so on.) At any rate, people felt compelled to find a word similar to that, but without the connotation of being neuter. For a long time, which filled this gap in the language; most Middle English texts would read the man which, but rarely the man who/that.
But which did not feel sufficiently animate, and so the speakers of English again searched for a new word. This is obvious in that the man which is very rare, if not outright incorrect, in Modern English. Eventually people decided upon who/whom for the job. In fact, who/whom almost so utterly pushed out that that, in many grammars of the eighteenth and nineteenth centuries, who/whom and which were listed as the proper words to use, with that being considered obsolete. We all know, however, that that was not content to be pushed to the side, as it now seems to be the commonest of the four words.