1. I know you're going through some difficult emotional problems but for the love of god PLEASE get tested for STDs ASAP. Also please disclose to your pcp the type of behavior that your ex was up to to see if they can suggest any other types of testing for the sake of your heath. Most STD tests are just chlamydia/gonorrhea but I would suggest an HIV test if your ex was taking part in any type of injection. 
2. HE FUCKED UP NOT YOU. Chalk all this up to "well that didn't end well at ALL". Learn from it, grow from it, but don't let it hold you back. This is HIS MISTAKE, not yours. There's nothing to do but keep your head up and move forward.
3.  It sucks being associated with a person who is now making unsavory mistakes- but it happens. From normal people to celebrities, sometimes the people we love end up failing us. It doesn't mean you didn't do a good job, it doesn't mean they didn't love you. It means you dodged a bullet, and it's time to start fresh.
4. Take the Dick Whitman route. Keep moving forward, continue like it didn't even fucking happen. Put your blinders on and just keep going. Fuck that guy. You keep being you, a wonderful, faithful person. You're not a fuck up- he is.