A Scanner Darkly 2006

plot
An undercover cop in a not-too-distant future becomes involved with a dangerous new drug and begins to lose his own identity as a result.