This line is a lyric from a song: 「どっかから現れた 感情が僕だ」 What is the が particle here used for? I've learned that the が particle would usually tie two nouns together as in, A is B, or something to that effect, but I can't see how it works in this sentence.
僕 ＝ どっかから現れた感情
どっかから現れた is a relative clause that modifies 感情.
"The emotion that has appeared from somewhere is me."
It is saying "I am merely that emotion (itself)." To paraphrase it, it means:
"I am (only) the emotion that has appeared from somewhere."