The man whom he thought was his friend
The man who (that) he thought was his friend (whom he thought his friend)
Similar to this, but with even less justification, is the use of the plural pronoun with the antecedent anybody, any one, somebody, some one, the intention being either to avoid the awkward "he or she," or to avoid committing oneself to either. Some bashful speakers even say, "A friend of mine told me that they, etc."
Use he with all the above words, unless the antecedent is or must be feminine.
The people is a political term, not to be confused with the public. From the people comes political support or opposition; from the public comes artistic appreciation or commercial patronage.