why would Erik ever get it into his head to program himself to become violent?
Because though artificial, he has intelligence, and is able to understand that destruction of something you care about may be prevented with violence. I don't disagree with your conjecture, but I think its possible that they didn't need to explicitly explain what they were banning in the programming, they're capable of figuring that out for themselves.
Doesn't that very line of thinking imply the awareness of the ability to be violent and therefore make him violent by nature?
No, violence is an action, not an awareness, or even a desire. You can be nonviolent will thinking about violence, hell I'd argue you have to be aware of the potential for an action to due harm to be violent, and especially nonviolent. Stepping on a slug you don't notice isn't violent, seeing a slug and running over to stomp on it to make sure its dead is. Result is the same to the slug, the violence of the act is through the perpetrator.
Erik might have failed at reprogramming himself for non-violence, as evidenced by the fact that he essentially killed one or both of the two Rachels when he assisted Ax in rejoining him
I don't know, that's a whole philosophy of life of thing in there: Cells are alive, when a sperm and egg merge, you don't really consider either or both to be dead, but they even though neither exists, what they make is also still alive as the zygote.
I think him doing this is violation of his programming as originally explained due to continuity errors by the author, not him reprogramming poorly