There is a relationship between sweet foods (including chocolate) and mood. It is partly related to simple pleasure mechanisms, but also seems to have some biological and even genetic basis.
Current research does not enable us to say whether eating such foods can be an effective ‘self-medication’ for mood disorders. But neither does it suggest that craving for chocolate and sweet foods is a genuine form of addiction.