Some people theorise that dreams are your brain's way of, as Bunthulhu said, tying up loose ends from your waking life, working out problems or showing your conscious mind what your unconscious mind is worrying about. Others say that dreams are completely random, composed entirely from images in your memory which is why it often seems like you are in two places at once in dreams. Neither theory is proven and I'm sure they are not at all mutually exclusive but they will be subject to a myriad of personal factors, and it really doesn't matter which you believe except that if you think the former is true then you can get bogged down trying to work out exactly what it is in your mind that is causing the weird dreams. So I have a few suggestions. The first is that you try and influence your dreams with peaceful media like music, reading or films, all of which should be of a comforting nature, shortly before you go to sleep. The second is that you make a real effort to dismiss these dreams as simply that, dreams, with no links to your waking life, either through cause or effect. Although it may not be very pleasant waking up in a state, it is not causing you any real damage, physically or psychologically so you could just try accepting that your dreams aren't very nice but not worry about it other than the first few minutes when you wake up. The third is that you choose to believe that your mental state from your waking life is influencing and being influenced by your dreams, and make a real effort to resolve the issue yourself. You can do this by keeping a detailed diary of your emotions and relationship problems each day along with what you dream each night, and try and forge a correlation between the two. If you can see a clear pattern whereby your dreams point to actual events in your life then maybe by solving the waking problems you will get rid of the unpleasant dreams. The final option is similar to the last, but that you get professional help from a psychologist specialising in nightmares or night terrors who might be able to help you. Hope you get it sorted out x