confirmed that the nissan part # 21304-JA11A will fit 2006 m35x. i'm guessing that if your engine is a vq35de, this part will fit. however, do not take my word and double check with your dealer. i saw a youtube video referencing this part for a 2008 m35 as well. picture for reference below (disclosure, this is a reference picture from a seller online)
in term of how-to, a quick google will yield several good tutorial. below are some tips for first timer on a 2006 model.
1- you want to clamp the two coolant hose from the engine and to the radiator. this is so when you remove the sandwich, you can remove the coolant hose to have more room/leverage to work on the gasket.
2- the part above is a little loose but will fit onto the oil cooler. use new oil to wet the O-ring/gasket before placing it back inside. below is a picture (from other online source) for reference
3- you will need either a 22mm wrench or socket to remove the bolt. it is not tight at all so when you put it back, do not go crazy over tighten it. i believe spec is 36 ft.lb
below is another picture (from other online source) for reference
by doing this yourself, you can save about 240 dollars. The gasket was bought at a local nissan dealer here in CT for 7.50 tax included. It took me about 30-45 minutes from start to finish.