Sheba, I have taught swim classes for the American Red Cross for 20 years (quit with onset of depression 5 years ago). The body naturally floats in a vertical position if you are absolutely motionless. The body floats vertically as well. Women float better than men due to the higher percentage of body fat than men. The higher the %age of body fat the better a person floats. A person can float face up or face down. Laws of physics are on your side. Bouyancy is on your side. (it is the upwards force that keeps things afloat). Newton's Law of Inertia is on your side. There are others, but they escape me. A good google of physics and swimming could help.
Go to the pool in advance or a bit early for your class and ask them to teach you some basic safety skills. How to stand up in water if you lose your balance, survival floating, what to do if you have a muscle cramp, what to do if you feel uncomfortable when asked to do a certain exercise, if you find your self floating face down, how to breathe without panicing. All these exercises can be done in less than waist deep water. All these things should be a part of your class, but if not, ask to ease your mind. I agree that visualizeing yourself in the perfect situation, enjoying class is the best way. However, knowing that there are specific techniques you can learn to help you (actions) feel more comfortable and have more positive thoughts about a great class and a useful skill!
In the classes I taught it was so rewarding to see an adult nonswimmer become more comfortable in the water. Some decided they could jump off a diving board at week's end! It was also great fun and realize you are not alone in your fear. I taught an average of 20 people annually in a rural town of 10,000 people.
I can't wait to hear about your swimming across the pool! I wish I could be there, that was one of the many pleasures I experienced in teaching swimming - adults! You can do it!