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 frighten one very severely. (Hyperbolically alludes to scaring one so badly that they lose their sanity.) 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.