Do something that is difficult. A real challenge. It is true: if you have little or no confidence/self-respect, you will allow people to treat you abysmally. Doing something difficult will make you see yourself with new eyes.
You can only change yourself. You can’t stop other people treating you abysmally, but you don’t have to take it. My strategy is to reduce contact time drastically: if your interaction is reduced to 2 mins pick up and drop off time, there are only 4 minutes in which to think ‘what a bastard’ per day! This is my strategy, and I know that I only do things this way because of my psychological makeup. You might be built differently so that other strategies give you that ‘yes, life is ok this way’ feeling.
Also: sit out your feelings. A relationship breakup is a loss, and you will probably undergo some sort of grieving process. Don’t force yourself to move on to the next stage too soon. In my case, I noticed a clear distinction between different phases. First I was incredibly sad. Then angry. Then denial started in the form of thinking it wouldn’t be pointless to go to couples counselling or on a joint holiday. Then bargaining: if I can prove that I can be extra nurturing and supportive and don’t need any emotional responses to anything ever, surely then you’ll have to be nice to me and help me fulfil my dreams of a functional family. There is no chance when the other person is just going through the motions. I think now I’m veering towards acceptance. Mostly thanks to that big challenge, and a hint of the old pissed-offness.
My university agreed to give me money to go to a conference abroad. My supervisor thought I was worth the effort of writing a statement in support, and good enough to go as a representative of my department. The organisers of this very big, prestigious and important conference (which took place in a 5* hotel!) thought I should present a paper on my research. They thought I would be good enough.
I’m thinking perhaps they were right. Not the misguided fool who wrote “I have polished your ego to the point you actually believe the bullshit I said to make you feel better.”