גַּ֤םevenadv · גַּם (H1571)Focus particle (with כִּי: concessive 'even if/when')גַּם (H1571) 'also, even'; גַּם כִּי 'even though, even when'.
כִּֽיwhenconj · כִּי (H3588)Concessive/conditional conjunctionכִּי (H3588); with גַּם introduces a concessive clause.
אֵלֵ֨ךְI walkQal impf 1cs · הָלַךְ (H3212)Predicate verb (concessive clause)→ Yiqtol: imperfective — hypothetical/recurring situationהָלַךְ / יָלַךְ (H3212) 'to go, walk'.
בְּגֵ֪יאthrough the valley ofprep בְּ + N com sg constr · גַּיְא (H1516)Locative prepositional phrase (construct head)גַּיְא (H1516) 'valley, ravine'; a narrow, shadowed wadi — dangerous ground for a flock.
צַלְמָ֡וֶתdeep darknessN m sg abs · צַלְמָוֶת (H6757)Genitive of construct chain (attributive)צַלְמָוֶת (H6757) pointed as a compound צֵל 'shadow' + מָוֶת 'death', 'shadow of death' (LXX σκιᾶς θανάτου); many scholars read צַלְמוּת 'deep darkness' from a root 'be dark' (cf. Job 10:21-22; Amos 5:8). Either way, deadly gloom; the crux is one of vocalization, not consonants.
לֹאnotneg · לֹא (H3808)Negativeלֹא (H3808) 'not'.
אִ֘ירָ֤אI will fearQal impf 1cs · יָרֵא (H3372)Predicate verb (main clause/apodosis)→ Yiqtol: imperfective — future/general ('I will not fear')יָרֵא (H3372) 'to fear'.
רָ֗עharmAdj m sg abs (substantival) · רַע (H7451)Direct objectרַע (H7451) 'evil, harm, calamity'; here danger/harm rather than moral evil.
כִּיforconj · כִּי (H3588)Causal conjunctionכִּי (H3588) 'for'; introduces the ground of fearlessness.
אַתָּ֥הyouindep pron 2ms · אַתָּה (H859)Subject of nominal clauseאַתָּה (H859) 'you'; the switch from 'he' to 'you' at the psalm's centre.
עִמָּדִ֑יare with meprep עִם + 1cs suffix · עִמָּד (H5978)Predicate prepositional phraseעִמָּד (H5978) 'with' (long form of עִם); 'you are with me' is the classic formula of divine presence and assistance (Gen 26:24; Isa 43:2).
שִׁבְטְךָ֥your rodN m sg constr + 2ms suffix · שֵׁבֶט (H7626)Subject (fronted, resumed by הֵמָּה)שֵׁבֶט (H7626) 'rod, club, sceptre'; the shepherd's club for defending the flock, also a royal sceptre.
וּ֝מִשְׁעַנְתֶּ֗ךָand your staffconj וְ + N f sg constr + 2ms suffix · מִשְׁעֶנֶת (H4938)Coordinated subject (fronted)מִשְׁעֶנֶת (H4938) 'staff, support' (from שָׁעַן 'lean'); the walking/guiding staff.
הֵ֣מָּהtheyindep pron 3mp · הֵמָּה (H1992)Resumptive subject pronoun (casus pendens)הֵמָּה (H1992) 'they'; resumes the fronted rod and staff for emphasis.
יְנַֽחֲמֻֽנִיcomfort mePiel impf 3mp + 1cs suffix · נָחַם (H5162)Predicate verb→ Yiqtol: imperfective — continuing comfortנָחַם (H5162) Piel 'to comfort, console' (Isa 40:1); the instruments of protection become sources of reassurance.