The first thing to do is to gather lots of information. The more you understand about what your friend or family member is experiencing, the more help and advice you can offer. This website is one great resource for you.
Bearing in mind that your friend or relative might resist the idea of testing and treatment, you must try to be helpful and supportive without being forceful or condescending.