Herzlich lieb hab ich dich, o Herr

"Herzlich lieb hab ich dich, o Herr" (From my heart I hold you dear, o Lord) is a Lutheran hymn in German by the Protestant theologian and reformer Martin Schalling, written in Amberg in 1569 and first printed in 1571. It is sung to an anonymous melody, Zahn No. 8326, which appeared in a tablature book for organ in 1577. The hymn is often used for funerals, especially the third and last stanza, "Ach Herr, laß dein lieb Engelein" (Ah Lord, let thine own angels dear). It appears in the current German Protestant hymnal Evangelisches Gesangbuch (EG).

Text
The first theme of the hymn is the love to God and one's neighbour, following the Great Commandment. Schalling included thoughts from. The hymn is regarded as a Sterbelied (song for the dying), as Schalling expressed stations of the transition after death in the last stanza, according to Lutheran doctrine as understood in the 17th century. The soul is seen as carried by angels to Abrahams schos (Abraham's bosom), according to, the body transforming in the grave, rising on the last day ("am Jüngsten Tage") to be reunited with the soul. The final line is "Ich will dich preisen ewiglich!" (I want to praise you for ever!)

Music
Several composers used the tune, some also the text. chorale preludes were composed by Johann Friedrich Alberti and Bach (BWV 340 and BWV 1115 ), among others.

Heinrich Schütz composed both a Geistliches Konzert (Sacred concerto, SWV 348) and a motet (SWV 387). Dieterich Buxtehude wrote an extensive cantata (BuxWV 41), probably for a church concert at the Marienkirche in Lübeck, a work regarded as a major Baroque cantata because of its clear architecture and thoughtful interpretation of the text. Johann Ernst Bach composed a sacred cantata.

Johann Sebastian Bach used the hymn in his cantatas and notably to conclude his St John Passion. In 1724, he used stanza 3, "Ach Herr, laß dein lieb Engelein" (Ah Lord, let thine own angels dear), in the first version of the work, and returned to it in the fourth and last version. In Es erhub sich ein Streit, BWV 19, composed in 1726 for St. Michael's Day, he quotes the melody instrumentally in the central tenor aria, played by the trumpet. Alfred Dürr writes that the Leipzig congregation would understand it as an allusion to the third stanza. Bach actually used this stanza to end Man singet mit Freuden vom Sieg, BWV 149, written for the same occasion two or three years later. Bach used the first stanza to conclude Ich liebe den Höchsten von ganzem Gemüte, BWV 174, written for Pentecost Monday of 1726.

Hugo Distler composed a chorale motet for eight vocal parts a cappella, his Op. 2, which Karl Straube recommended for print as the work of a mature master of polyphony. "Herzlich lieb hab ich dich, o Herr" is part of the current German Protestant hymnal Evangelisches Gesangbuch (EG) under number 397.