This would obviously appear to depend on the country in which the police are operating.
In the case of The Mentalist, this would be the United States and in particular California.
Based on some initial research of US laws and Californian laws, the answer seems to be: It Depends.
In People v. Mays (Docket No. C057099), a Californian case from 2009, the police attached a suspect to a fake polygraph machine (lie detector). They pretend to administer the test and told the suspect he had failed. As the suspect believed it was real, he admitted he had been at the scene of the crime. It was held that this form of lying was perfectly legal and the suspect's confession was admissible:
Police trickery that occurs in the process of a criminal interrogation
does not, by itself, render a confession involuntary and violate the
state or federal due process clause. Why? Because subterfuge is not
necessarily coercive in nature. And unless the police engage in
conduct which coerces a suspect into confessing, no finding of
involuntariness can be made. So long as a police officer’s
misrepresentations or omissions are not of a kind likely to produce a
false confession, confessions prompted by deception are admissible in
evidence.
This interesting blog article from Patrol Log discuss the consequences of this case, suggesting:
You can tell them that:
1) Their fingerprints or DNA match those taken from the crime scene,
even if they don’t, or even if you don’t have any fingerprints or DNA
evidence at all.
2) You have a video of their crime or a witness’s statement
identifying them as the ones involved, even if this is not true.
3) If they have an accomplice, you can tell them that you already have
the accomplice in custody, and they have already confessed, even if
this isn’t true.
4) You can tell them that you found evidence of the crime in their
vehicle or apartment, even if you haven’t.
According to Police Link:
The landmark decision regulating false statements made to a suspect is
the U.S. Supreme Court case of Frazier v. Cupp, 394 U.S. 731, 1969.
The case involved the interrogation of a homicide suspect who was
falsely told that an accomplice had already implicated the suspect in
the killing. This lie persuaded the suspect to confess to the
homicide. The Supreme Court ruled that such use of trickery and deceit
can be permissible (depending on the totality of circumstances)
provided that it does not shock the conscience of the court or
community.
However, there are limits. This very recent article about NY rulings show some of the limits:
In a unanimous ruling, the New York State Court of Appeals tossed out
the 2009 conviction of Adrian Thomas for the murder of his infant son,
finding that Troy, N.Y., police had overstepped their prerogative to
use artifice when they told Mr. Thomas that his son, who was
brain-dead, was alive and could be saved with his confession, among
numerous other falsehoods.
So the answer appears to be: The police can lie in some cases.
However, it should be noted this information has come from a smattering of different sources and should not be trusted on as actual legal advice. For that, you should contact a lawyer.