'Heartache' is a minor motif heard in Toriel and Asgore's battle themes, Heartache and ASGORE.
It also gets a cameo appearance in Super Smash Brothers Ultimate, in the background of its version of MEGALOVANIA.
The motif has yet to appear in Deltarune, but it does seemingly appear in an unused track, sneaking.mp3 (released via the Autumn 2023 Newsletter).
The motif itself is split into two somewhat distinct parts:
('Heartache A' and 'Heartache B', as heard in Heartache)
Together, they make up the 'Heartache' leitmotif in full:
('Heartache', as heard in Heartache)
Finally, as discussed on the page 'On the Origins of Undertale and Deltarune's Leitmotifs', the 'Heartache' leitmotif originates from a project prior to Undertale.