What, in the sense of that which, or those which, is an antecedent and relative combined. Because it may be either singular or plural in number, and either subjective or objective in case, it needs careful handling.
Its difficulties of number can be solved by asking the question "what does it stand for? "
What is needed is more rooms.
Here what means the thing that, and the singular verb is right. On the other hand, in the sentence "He no doubt acted with what are in his opinion excellent reasons" are is right because what is equivalent to reasons that.
Because what may be subjective or objective writers may find themselves making the same word do duty in both cases, a practice condemned by grammarians. For instance:
This was what came into his head and he said without thinking.
What is here being made to do duty both as the subject of came and as the object of said. We must write either:
This is what (subjective) came into his head and what (objective) he said without thinking.
or, preferably,
This is what came into his head, and he said it without thinking.