You have a handle on what is wrong, this is part of loosing someone close to you, it takes time, you have to simply 'be " dont fight it, you have to grieve, and accept that this awful thing happened to your friend. You said a very true thing "I really need some help to try and get it out of my head" in other words you realise it is your thoughts making you feel bad , so next time you find yourself dwelling on his death/obsessing about it, tell yourself "STOP" I will not do this' give your self a min or two, then distract your self doing something, ground yourself, Its Impossible to experience any negative feeling without first creating a corresponding negative thought.When you go to bed, visualise something nice, a happy place, maybe a special garden a Beach, picture yourself in that place ,walking along,smelling the flowers or the ocean, stay there... its warm and comfortable in your place...do this each night it will become a habit, you will fall asleep...its called visualisation.Good luck let us know how you are doing..