Mental confusion

Have any of you experienced a terrible mental confusion, to the point of forgetting how to speak or how to formulate sentences inside your brain? It becomes impossible to study or listen to other people, your mind doesn't even seem to know its own language anymore. Has anyone ever been through this? Do you know what can help? Does it pass with time?