Things that often help me, when Im in a darker mood (those may sound counterproductive, but for me they work very well): Dont take yourself and your life so serious. Try to visualize yourself from above and see how tiny those problems and your negative emotions really are. Aside from this method from shrinking your own perspective from time to time, what works surprisingly well in a lot of cases is to question yourself. Sure, you may have your problems, you may hate yourself and/or someone else, or at least a part of you may think like that. So actively confront that part. Act as if it were seperate from you at first and ask it what exactly the problem is. Make it verbalize it and work towards union, in the end, mentally reunite with it, no matter if you really do it or not, just ACT as good as you can at first. Then stop thinking about it and repeat at some other time, depending on how you feel. This may require some work to get used to.
Those are methods that i worked out for myself, so an ultimate tip would be: Be creative at dealing with these kind of things. Invent your own methods and see what works for you. If it really goes out of hand ( total loss of control), then go see a professional. But being creative is a good way to go at it and doesnt even have to exclude a psychiatrist.