Take a quick look at your notes (that's what they're for) and if you don't have any, look at your visual aid for a hint. If for some reason you don't have one of those, think through the points you're making in the speech and try to figure out where you are. If you can't remember any of those, run fast and far away.
Approach an adult such as a high school counselor. Inform them of the situation. Then, after the adult consults with the friend, I would approach him/her and help them out with whatever they are going through. I'd tell them that I'm there for them and try to help to get them to stop.