One thing that is very important here is to NOT let the first exam let you down. It's always demoralizing to have a bad start in a class, but it's not the end of the class.
My suggestion is to study hard to make up for the failed test. On top of that, this class probably allows for a dropped exam, right? (most engineering-type classes have some kind of system like that).
However if the class is not like that, then chances are you can still pull at least a B out of the class if you get a decent grade in everything else. I know this is hard, but the absolute best way to pass a class is to set aside a daily, regular schedule for the class. Since it's a entry class, an hour a day should do it, and maybe 1.5 hours the week of a test.
You sound like a smart guy (after all, you made it into college), so don't give up on the class! Stick it out until you're sure you're doomed (your college should also have a class drop deadline, try and wait until just before then to make your drop decision).