I went through the exact same thing during my first year of Uni at NTU - For starters, do not worry. It's actually a lot more common than people (Uni's especially) to fail a few modules, especially in first year (not too sure why but I fell victim to it, so...).
My only advice is to work, and work hard this summer. I didn't really, and ended up repeating the year (got through that way eventually), but it set me back and really, really hit me hard. You say you worked hard and that in itself is a good thing, just continue to do it and keep in regular contact with your tutors for those modules. They are there as full-time professors and they are there to help you through. Do not feel like you are bugging them. Even if you are, so what? They are paid for this and you are entitled to ask for help. Quickly make note of aspects of the modules you are struggling with and then get them sorted.
Above all else, do not let these modules get you down. Failing in first year isn't the end of the world, especially with the chance of re-sits. It does not affect your overall degree to have to re-sit them, so just keep as confident as you can and keep in a regular routine of revision. And again, use your tutors, they are your most valuable asset!!
If you need any more advice, feel free to PM me, as i've said i've been through this before.