I cut up my upper arms quite a bit when I was younger, long before it was "cool" to do. I would also sometimes punch myself in the arms, legs, and stomach, and whip my back with a belt. Sure, it can be a rush and a novel sensation, but that doesn't even remotely make it worth the trouble, or the scars. It was then, and remains now, an utterly stupid thing to participate in.
It doesn't actually help in any way--whoever introduced that idea into our culture should be deeply ashamed of themselves--it only serves to dramatize one's own acceptance of their depression. It's as though you're saying to yourself "Look! This is how bad it is!" It's an exercise in self-importance, the quiet cousin of attention-seeking. It doesn't solve any problem, it only creates a new, smaller one, that you feel like you can control; at least until it, too, gets out of control and you find it has become a habit you can't easily stop.
Doing it can give you the comforting feeling that you're taking control of your life, and that you're doing something that makes you feel alive despite the deadening sensation of being walled-in by depression and anxiety. There are vastly better ways to accomplish this, many of which will actually serve to fix the problems that would drive you to cut in the first place.
One is to go and actually do something to confront your anxiety or depression, either by finally deciding to see a therapist, finally "coming out" about your problem to friends and/or family, or just going out and trying something. It could be many things. This is obviously hardest of all, but I mention it first to highlight the fact that cutting isn't a way to do this. Cutting is a distraction, and serves to perpetuate the original problem.
Another way is to keep a journal or diary. No doubt you've heard that advice before; the reason is that it works. It's harder to do than it seems, though. We often try too hard to make our journals into literature, criticizing and editing our writing and holding it to an absurdly high standard. The truth is that the purpose of a journal isn't to record events for some future audience to read, it's for you, right now to get your thoughts and feelings out.
It doesn't matter at all how you write or what you write or when you write or whether you write in a fancy notebook or on scraps and receipt backs. It's all about you letting go of things locked up inside you. When you get into doing this, it can be vastly more cathartic than cutting and with the added benefit that it lets you remain focused on the problems you're trying to solve. It may help to start by trying to write every time you get the urge to cut, and if you can't think of anything to write, write about the urge, write about the challenge of writing, and write about what you feel like cutting was going to relieve you from. More importantly, write when you don't feel the urge, or when you've chosen to overcome it. Recording that will give you a pattern to follow.
Exercise is another way. I think the reason that works is that it gives you an escape from your normal state of mind. When you're working up a sweat, you don't really have the attention to spare to obsess about your problems. Without all that extra thinking, your mind can't exaggerate and distort your problems--so even if they don't go away, you see them more realistically, which is a major part of working them out. It also helps because the more you exercise, the more you improve, which can be a great boost of confidence when you feel like things are "stuck" the way they are.
A long walk (no, longer than that) may be a good start, depending on whether you're comfortable getting out like that, and depending on where you live. It's inconspicuous and gives you a lot of exposure to the world without a lot of social contact.
Finally, it's helpful to break any "ritual" you've devised for cutting--where and when you do it, what you use, how you clean up, and so on. If you know something that you want to stop doing, it can help to arrange things so you can't do them without extra effort. For some people, this means getting rid of everything they can cut with, but that's often impractical. Simpler than that, just moving it can work. For example, if you cut in the privacy of your bedroom, then move everything sharp to the bathroom. Or put it all in a box and tape it shut (good luck opening it without anything sharp!). Just do something to break the routine of doing it.
It may seem juvenile to do such small things when you may think you shouldn't need to, but if it helps, why not do it? It's just a crutch until you no longer need it. And remember, if you "slip up" on something you're trying to stop doing, there's no reason to stop trying. Everyone has setbacks.
I hope this helps.