Mega voltage regulator overheating

Not just OK, it is required. Ground is the common reference between the parts.

To be sure though, please post a schematic showing all of the parts and power supplies. Hand drawn, photographed and posted is fine if you don't have a CAD program. If you want to try CAD, here is a good start.