Speaking of Schopenhauer and Wittgenstein, in Allan Janik's chapter on Schopenhauer in his Assembling Reminders, he writes of the "dramatic swing" to questions about the meaning of life that can be seen in Wittgenstein's notebooks in July 1916 (and of related discussions elsewhere in these notebooks) that, "There is no doubt whatsoever that these new philosophical questions were prompted by Schopenhauer..." (pp. 75-76). Klagge's view is that they were prompted by the mortal danger that Wittgenstein was in at the time, and I think he is about as certain of this as Janik is of his thesis.
Probably both are right. Wittgenstein thought about death, God, the meaning of life, and so on, because he was in a war and liable to be killed any time. But he did so in Schopenhauerian terms because he was so steeped in Schopenhauer's work. Janik suggests (p. 95) that Wittgenstein probably knew not only The World as Will and Representation but also Aphorisms for Living Wisely and On the Fourfold Root of the Principle of Sufficient Reason pretty well. No one knows, though, as he acknowledges.
I would conclude that, as I say, probably both are right, but maybe just one is, and maybe neither is. (I enjoyed Janik's book, by the way, and wouldn't call it "gruesome" as the lone reviewer on amazon does.)