frighten/scare somebody out of their wits
frighten (one) out of (one's) wits
To shock or scare one very suddenly and/or severely. Hyperbolically alludes to frightening one so severely as to cause them to become insane. Don't sneak up on me like that, you frightened me out of my wits! That car accident seems to have frightened Janet out of her wits—she's still shaken by it.
scare (one) out of (one's) wits
To shock or scare one very suddenly and/or severely. (Hyperbolically alludes to frightening one so severely as to cause them to become insane.) Don't sneak up on me like that, you scared me out of my wits! That car accident seems to have scared Janet out of her wits—she's still shaken by it.