Will learning math solve your mood?
If you like mathematical logic, learning mathematics can make you feel fun, but it doesn't mean "solving your emotions". When you are emotional, you need to find something that bothers you and try to relieve it with actions, such as distracting yourself and analyzing yourself. Of course, if you are not math material and don't like math, your mood will only be worse.