You are correct. Mental rehearsal, as lifelike as possible, can be a very useful preparation for emergency situations.
I actually pretended to be killing an attacker right before I would leave to walk home at night. The ladies at work sure wondered at me, but when I explained why I doing it they seemed OK with it. I would practice for a little before I left because I felt I wanted the reflex fresh in my mind. An attacker (thank God none materialized) sure would have gotten more than he bargained for, maybe even death. Attackers may often not expect someone to be mentally prepared and rely on the shock factor with someone becoming frozen with fear.
The most important thing I did when I walked home alone past lonely places was to pray for God's protection. I am always praying for my loved ones and myself, that The LORD keeps us safe, as only He can ultimately do.