I have added a new input socket for the Math node but it doesn't take it into consideration (it calculates merely the two default input sockets). Is it possible at all to force the Math node to take into account a supplementary socket?
No. Even if it’s technically possible, you shouldn’t go around modifying nodes that don’t belong to you—they are written with a specific set of sockets and properties in mind, and they will not magically adapt to some other configuration.
If you want to add three values, you will have to use two Add nodes. If you really want a three-socket Add node, you can wrap two Add nodes in a node group.