I remember how that felt...I had a pretty rough first semester, not like I was in danger of failing out, but I had a similar experience to you with math (though not eng. math.) I ended up getting below-a-B but I felt like I had no idea what I was doing by the end of the course. I've gotten a worse grade than that since then, but I've also gotten some hard-earned A's on occasion as well.
anyway, I truly don't think this will have a negative affect on your future. you will have so many more semesters and classes that this can't make a huge difference on your GPA, and you can show future employers, grad schools, med schools, whatever, that you are capable. definitely now is NOT the time to give up. if you feel like you've given it your best, factoring in that you are living in a totally new environment that places a lot of new pressures on you, then that's the best you can do. it makes sense that you would feel depressed, since it's no fun do struggle in a class...try to take some of that energy and think about what you can do better next semester.
also, specifically about grad school, I know that the sciences your GPA is important but your research experience and specific interests are also really critical. I don't know what kind of engineering you're doing, or what kind of grad school you're specifically interested in, but it's probably one of the ones where GPA is just one of many important factors. after all, you hear lots about pre-meds stressing about GPAs, but you never hear that about kids hoping to go to grad school, even though they're often in the same classes.