The Kovak Box
(2007)

Inspired by Gloomy Sunday, the first novel by David Norton Fank, Kovak (David Kelly) began a procedure into brain manipulation. On being diagnosed with an inoperable brain tumor, he set out to leave his mark upon the world via implants triggered by the song Gloomy Sunday.

David (Timothy Hutton) winds up being forced into shooting him

Thanks ND Woods!