Oh and also, eating things won't give you diseases either as the Hydrochloric acid in your stomach kills everything! The body is a very clever thing. It's just the brain that can be problematic!
Ahh don't worry about hiv and hep from things like that. hiv survives for only minutes outside the body- it's killed by oxygen and water so in a washing machine- it'd definitely be dead and you can't get things from touching objects!! The skin is the best barrier we have for infection so you have NO WORRIES there! The only way you could catch things from your friend is if you had sex with him (which i don't think you're going to do) or if you shared needles for drug use. And that's even if he has hiv or hep because every man has sperm and blood, doesn't mean they have any diseases!
You sound to me like you're a little depressed. You need to find new things to focus on. Worrying about irrational things isn't nice as it takes over your life and the way you view things.. Try to have a healthy diet, do some exercise and take up some hobbies.. they are 3 basic things that may make you feel a bit more positive. Also talk to your doctor about cognitive behaviour therapy and maybe an anti-depressant to lift your mood. I'm taking one and it's really helping me! Everytime these worries come into your head.. just tell yourself to stop.. take control of them. Don't let them take control of you! Do something to distract yourself. Phone someone and have a chat, make a drink, go out for a walk. You have no real cause for concern.. it's your mind creating these problems and it's with the power of your mind that you will overcome them :-)
Also.. sometimes he will put his dirty pants in the washing machine with mine. This is another fear bcz I am sure his pants are stained with sperm, is this a risk to me? I scared that his sperm will come off his pants and on to my own pants.