Sorry to hear about your friend. It's awful when something like that hits so close to home. THE problem with the internet is it seems so anonymous but people are still affected terribly. You've Been the bigger person to acknowledge what you did was wrong, even by association but now you need to put it behind you and chalk it up to experience and learn from it.
Take care of you and your friends