The lovers put their initials and date, pinpricked on, presumably after the pendant was bought. Two initials are chased in - "M"s with the date "1798", you can barely see it but its there.
These personal scent containers have gone by a variety of names (pomanders, vinaigrettes, spice boxes, perfume flacons ...) and were used for a variety of purposes from amulet to smelling salts. The Danes call them 'Hovedvandsæg'. Worn on a chain or held in the hand or pocket, they came in many shapes and were often given as an engagement present from the groom-to-be to his future bride. This one can be strung on a ribbon and worn as a pendant.
Similar to the English vinaigrette, the hinged compartment contained a sponge soaked in an aromatic liquid, usually vinegar infused with spices (marjoram, lavendula, lilieconval, sage, clove, cardamom, rose essence, or cinnamon) and was held to the nose for restorative purposes. It is gold washed inside to protect the silver.
Height 6cms width 4 cms 
Weight 34 grams
No silver mark

Danish love heart in silver

18th century Danish antique silver heart pendant, dated