Once you retake the F in math, the new grade replaces the old one in regards to calculating your GPA. The old grades stays on your transcripts, but it’s really just an FYI.
If you retake (and pass) the math class over summer, then you would be eligible for TAG, and if you follow all the requirements to maintain eligibility, then you’re golden.
If you retake (and pass) math in the Fall, then your app will be more competitive because 1) your GPA will be much higher 2) They will see you have already passed a transferable math class.
You submit applications in November 2016, then in January 2017, they ask you to report the grades you earned in the Fall 2016. They also ask you to tell them what courses you will be taking in Spring 2017. The Spring 17 grades aren’t used to determine admission, but the coursework will tell schools if you’ll meet all requirements. The schools assume you will complete and pass those classes with grades that are similar to grades you’ve had up to that point.