Incidentally there are some studies with rats showing that sugar/sweet addicted + cocaine addicted rats prefer their sugar hit over their cocaine hit, and plain sugar-addicted rats when removed from sugar/sweet had opiate-withdrawal like symptoms.
Eating sweets does improve mood. There are several known mechanisms. e.g., carbs facilitate amino acid transport across the blood-brain barrier [1], and wheat stimulates endogenous opiate receptors [2]. But, if you want to influence brain chemistry therapeutically, eating sweets is probably not the best approach. Good luck!