The title "Der Doppelgänger" is Schubert's; in Heine's Buch der Lieder the poem is untitled, making the ending a surprise.
Still ist die Nacht, es ruhen die Gassen,
The night is quiet, the streets are calm,
Heine's Buch der Lieder is divided into five sections; all the poems set in Schwanengesang are from the third, Die Heimkehr ("The homecoming"). In Schwanengesang, this song stands at the end of the Heine songs, although Heine's order is different and it has been argued that the sequence works better dramatically when the songs are performed in their order of appearance in the Buch der Lieder.
Der Doppelgänger is through-composed; each stanza's setting is different. But not altogether different: the song is a kind of passacaglia on the theme of the first four bars of the piano part; this simple harmonic progression, with the piano part consisting almost entirely of block chords, dominates the song and does much to give it its feeling of inexorability, and its brief abandonment (displaced by a succession of increasingly dissonant chords) at the climax of the song signals the frantic horror of the poet.
The song is 63 bars long, and in a typical performance lasts between 4 and 5 minutes. It is in the key of B minor, the same as Schubert's Unfinished symphony.