"Possessed" is a bad word choice in this circumstance.
If you say "possessed by," you are saying that the words have taken over his mind, exactly like demonic possession. Even if that was your intent, you should say it differently, and add more context to make it clear.
If you say "possessed of," you are saying that his mind now has a copy of her words in it. This is an archaic usage. It still looks wrong, and would sound odd even to someone who recognized and expected that construction. (Usually it would refer to some character trait, and then usually ironically: "He was possessed of a boundless enthusiasm for beetles of all kinds.")
"Possessed with" is almost always incorrect. When it is correct, it takes one of the two meanings above.
Try either "His mind became obsessed with her words;" "His mind was [seized/captivated/entranced] by her words;" or something a little more flowery like "Her words burned into his mind."