It is one of four interconnected sentiments in the system.
the others being fear, anger, and joy. In this system, when an impulsive tendency towards some important object is frustrated, the resultant sentiment is sorrow.
Thus the primary emotion of sorrow is the basis for the emotion of pity, which describes a fusion of sorrow and joy: sorrow at the injury done to the object of pity, and joy as an "element of sweetness" tinging that sorrow.