be frightened out of (one's) wits
To be shocked or scared very suddenly and/or severely. Hyperbolically alludes to frightening one so severely as to cause them to lose their mind. I was frightened out of my wits when you snuck up on me like that!
be frightened (or scared) out of your wits
be extremely frightened.