Withdrawing with a W

I’ve never been in this position before. I just got my midterm back, and got an F. My major is molecular biology, and have a 3.3 GPA. It’s an Upper Division Biology elective, so it is not one of my major classes. I am not planning on Grad school, but would like to keep my options open if I do decide to.

Would dropping with a W look bad on my transcript especially in an UD class in my major’s department? Or would it be better to try to bring up the grade with the other midterm and the final?

Thank you!