Excellent episode, but why kill off a popular character like Derek? Cancel or not. Maybe a Derek from an altered Future will return?
I hope not. Derek from an altered future would be a "cop out" IMHO, much like B-4 from Star Trek: Nemesis. I think in order to grow into mankind's savior, John Connor needs to lose the people closest to him (Riley, Charlie, Derek, and at some point, Sarah).
In regard to killing Derek, I think the show's writers/producers are striving to make the show as "real" and dark as they can. This isn't a show where the good guys always win and the bad guys always lose. The good guy might win, but they'll go through hell and back, and not everybody's going to make it to the end (with the exception of John Connor).