I've never found any 'replacement' such as ice cubes/ marker pens helpful to be honest, I've been able to delay harming for a while with these kinds of things but they haven't helped me to stop. I have been able to reduce how often I self-harm, and surpass the urge in some ways though.
Things that I've found have been able to get me beyond the urge are usually physical/active things - I try to take myself out of the house when I feel an urge to self-harm. I will go for a run or will go out cycling and often I don't still want to self-harm when I get back. Even just going out to the shops or something can help - when I'm not at home I'm not in a position to self-harm and often the urge is gone when I'm home. I will delay going home as much as I can so that I just go home and straight to bed if necessary. If it's possible just taking myself to bed is a good way to ignore the urge and it is almost always gone in the morning. The worst thing I can do is stay home as no matter how much I try and distract myself I am usually just delaying myself from self-harming. I do find it helpful to write down what's on my mind but not necessarily in the moment - if I write in my diary I will still want to self-harm afterwards.
Human contact does usually help for me, even if I can't meet up with someone in person a chat on the phone/skype usually has me feeling okay again. I am lucky to have a close, supportive group of friends who have expressed I'm free to call them any time of day/night. I do find it very difficult to phone people when I'm in crisis though, I don't like to feel like I'm imposing and rarely manage to reach out. I have found it easier to send out a facebook message to a group of friends saying something along the lines of 'Anyone free for a phonecall?' so that I have confirmation I'm free to ring. that helps as I know I won't be imposing as people can ignore it if they want to and usually one of my friends will be free.
I also found it helpful to record it every time I self-harmed and to see how long I was going between self-harming. I would set records with myself to try and go a little longer in-between. It also helped to recognise whether there were any patterns (eg: time of day, days of week, time of month etc) I was harming - there were patterns so I was able to pre-empt times I might get the urge to self-harm.
I also arranged with a friend to go swimming weekly at our local gym which really helped as I felt I wasn't able to self-harm or I knew I would either have to cancel or risk her seeing it so it made me really think before I self-harmed.
It also has helped me to try not to have the resources to self-harm, for example I used to carry things in my handbag which meant I wasn't always safe out of the house. When I was feeling well I removed all of these so that I was only in a position to self-harm at home. I've also made sure that things I can use to self-harm are not easy to get, so for example wrapped up in layers and layers of duck tape so I really have to struggle to get into them - if I didn't really NEED to self-harm I would give up before I succeeded to get into it. Keeping things I would use to self-harm at the bottom of a box of happy things (eg: photos, letter from friends) also worked quite well in the past as sometimes I could distract myself from happy things.
It is hard - I liken self-harm to an addiction and once it becomes a part of your identity it is so hard to stop. I have managed to reduce it to so that I may go months in-between self-harming and it is no longer the first thing my mind jumps to when things are hard and when I do think about doing it I am able to stop myself from following through more and more.
Good luck and hope you find the method which will help you to stop :)