Remember that in the your dreams your most intimate fears and longings are given an exterior life of their own in the form of the people, objects and places of your dream. Therefore our sexual drive may be shown as a person and how we relate to them; or given shape and colour as an object; or given mood as a scene. Our feeling of ambition might thus be portrayed as a business person in our dream – our changing emotions as the sea or a river; while the present relationship we have with our ambition or emotions is expressed in the events or plot of the dream.
So it is not your ex you are dreaming of, but your dreams are showing you your inner feelings about the past relationship and all the memories needing to be digested and learned from. Remember that because you were together for a while there is no way you can ‘have nothing to do’ with someone you have been intimately involved with. It doesn’t work like that. Most people are often totally unaware of the massive experience they take in during a relationship and how it interacts with them when we love someone. In other words the memories and experience we gather unconsciously change us and are not lost. It is part of you and is symbolised in dreams as a person or event. See An experience of a person’s influence
So if you are troubled by dreams of your ex, the best way to deal with them is to work on integrating the influence left in you from the relationship. You can do this by thinking about the dreams about your ex and drawing on all you got from him or her. So I would suggest you integrate all the good and bad things. Try doing this by taking the dream images of your ex and pulling them back into your body. Yes, literally making them one with you. Do this slowly and allow any feelings that arise. This may sound strange but all the images in our dreams are projections from you inner world onto the screen of our sleeping mind; so taking them back into you is like owning them and integrating them. It is called honouring what we learned, bad or good, from the relationship. Think of it like digesting something. In a relationship, whether a feeling relationship or one in which you are learning something, you often absorb things from the person. You might take in such things unconsciously, as you did many things from parents and from the culture you were raised in. So the process of absorption in a dream may refer to such influences you are taking in. See Techniques for Exploring your Dreams