I suffer from bouts of anxiety and depression. I also like to partake in cannabis. If I'm feeling depressed, anxious, sad - WARNING - don't do cannabis!! It amplifies the feeling. I would never use it for an escape from bad stuff. If I'm feeling good, then go for it!
It's a mind altering substance. If your mind isn't in a great place to begin with, what do people think cannabis is going to do?
And yeah, cut down on caffeine and sleep some more.