Fight your instincts, not the water. Everyone who falls unexpectedly into cold water wants to follow the same instinct: to swim hard and to fight the cold water. But when people fight it, chances are that they lose.
Try practising your floating technique in a controlled environment, like your local swimming pool. Find out how you can float to live at this British website. http://www.respectthewater.com/how-to-float/