I wouldn’t consider it an acceptable way to refer to mental illness. Someone I would refer to as “sick in the head” actually wouldn’t be mentally ill but an evil, manipulating, scheming [bleep]. The kind of person who takes perverse pleasure in causing others misery. That is someone who is sick in the head.
It is my understanding that where one might say in American English to a friend "you are insane" as a form of humor or a jest to describe their crazy behavior, that to say "du er syg I hovedet" is a very deep insult to any Dane; at least that was the case when I lived in Denmark 50 years ago. Is that still the case or has the language changed? Also, it would never be appropriate to discuss mental illness that way in America.