If your friend is actively suicidal, then a referral needs to be made to the local CRHTT (Crisis Resolution and Home Treatment Team). They will be able to offer an immediate intervention and support your friend until the crisis (in this case the suicidal thought) passes.
If your friend is having fleeting suicidal thoughts, but no real suicidal intention (lots of people "think" that they want to commit suicide, but when they actually think about it, there are many protective factors which would prevent them from doing so), then the GP can refer to either the local CMHT (Community Mental Health Team), or the local Primary Care Mental Health Team, depending on the urgency of the intervention required. The CMHT will be able to offer outpatient appointments with a Psychiatrist, as well as prescribe medication and provide the support of a CPN (community psychiatric nurse) if required.
Primary Care is a more routine service and offers a more CBT based approach to treatment, with the focus being on 'self help'. They run groups specifically aimed at people with OCD and this could prove to be just as helpful (if not more so) than medication in the medium and long term as it teaches people how to manage and deal with their symptoms, rather than becoming reliant on medication. CBT does not work for everybody in the same way - some people find it extremely beneficial, whereas others find it of little use.
I work for the Primary Mental Health Support Service (Primary Care) in Cardiff, and my girlfriend works for the South Cardiff Crisis Resolution and Home Treatment team. We would ALWAYS advise that your friend goes to see his GP in the first instance, and explains the issues being faced. If your friend has trouble explaining things to others, then offer to go with him for a bit of moral support. If your friend is having suicidal thoughts then this NEEDS to be brought up with the GP so that they can offer the most relevant support available (even if your friend plays down these thoughts).
The Primary Mental Health Support Service in Cardiff runs an OCD group which is proving to be very well received (I should know as I administer the thing!).
All the best. Mental Health is a difficult thing to deal with but your friend has taken the right first steps by discussing them with you.