Crying because you're sad is a cathartic process, turning all your aggression and unhappiness into tears and crying.
After the crying is done, the heart feels much better because it has stopped and closed the loop.