Dictionaries say that the idiom "beating one's head against the wall" means:
To attempt continuously and fruitlessly to accomplish some task or achieve some goal that is or seems ultimately hopeless.
As you see here in the definition, the expression includes the connotation of a useless action.
There is an Example in the Freedictionary as below:
Some people are never going to agree with you on this, so it's no use beating your head against a wall trying to convince everyone.
I think the segment **"in no use" is redundant here, while the idiom encompasses the meaning.
P.S. Although to me, this expressions means: to try so much to do something and it doesnt have the connotation of "a useless action".
I wonder if you could explain that to me.