DO you have the M42 temp semsor fitted to the head (it's the one with teh single pin in it)? If so, are you using the M42 ECU loom? Ensure that you have the plugs connected up right, ie the 2 pin tem sensor is for teh ECU the single pin is for the temp guage.
Do you have the "chip" for the M42 fitted to your instrument cluster?
If you answer is yes to all the above it could be a "wiring" difference between M42 and M40 car looms, but I do know of other people that have done this swap without this issue.
Let us know how you get on.
Congrats with coming into the light with an M42:)