In my experience, the math courses tend to get easier later on for a variety of reasons:
1) You learn simplifying techniques. (you'll learn to love the Laplace transform)
2) You get better at studying. I also failed my first (and second) calculus course. It took me an embarrassingly long time to learn how to study. (Tip: Find a friend to study with!)
3) You'll eventually start applying it to interesting problems. I found control theory really interesting, so it became a lot easier to care about the math involved.