If your safety is ever in danger, you have a right to protect yourself. You deserve protecting. If you are in danger and you injure someone trying to protect yourself, it is self defense. If someone intends you harm, they are not interested in your wellbeing, which means your safety must be more important to you than theirs.
Violence is always a choice. If someone has intention to harm you, you must protect yourself and get to safety. If you must use violence, aim for one of the primary targets: the eyes, the throat, or the knees. If any of these three body parts are damaged it will be hard to chase you, follow you or stop you.
You know how awful it is to have a bit of dust in your eye. It is not hard to cause the eyes to tear, then your attacker cannot see you and you have time to get away. If you hit their throat, they cannot breath for a moment and you have time to get away. If you damage their knees they cannot follow you.
Other parts of the body can be...