Translation doubt: 自分とは何でどこへ向かうべきか


This is an excerpt from a song I'm trying to translate:

> 自分とは何でどこへ向かうべきか

自分 - oneself,

何でどこ - why, where,

向かう - head (verb),

べき - suffix meaning "should"

My doubts are what とは means and what is the role of か in the sentence? I can't
give the whole sentence a general meaning. Can you help me, please?

Thank you very much




Unfortunately, 「[何]{なん}で」 _**does not**_ mean "why" here. Thinking that it
does would make one go crazy over this line.

> 「[自分]{じぶん}とは[何]{なん}でどこへ[向]{む}かうべきか」＝
>
> 「自分とは何で、どこへ向かうべきか」＝
>
> 「自分とは何であり、（そして）どこへ向かうべきか」 （あり＝あって）

「何」 means "what". "Who" might fit better in the context, though.

「とは」 is an emphatic topic marker. 「か」 is a question marker. Why am even I
explaining these when they should be in the dictionary?

> "Who/What am I and where should I be headed?"

