Based on what I've learned through experience working as a Paramedic, you will probably know that you are overdosing before you go into seizures or worse, stop breathing or have a life threatening heart rhythm, so tell someone quickly if you feel like it is going to happen. Trust your instincts, they are usually very accurate. Also, I would plan ahead with one of your friends who will be with you, what you all will do if either of you were to overdose. Check for a pulse at the carotid artery (look online to find where it is if you do not know) and listen/look/feel for any breathing. Try to wake him up quickly by clenching your fist and rubbing (fairly hard) the tip of your knuckles back and forth along his sternum. This is called a sternum rub and it is quite painful, so if he doesn't respond to this you know that an ambulance is essential for his survival. Keep a cell phone on you! If nothing is working within ~15 seconds call 911 IMMEDIATELY and tell them what is happening. Explain quickly that your friend is having a seizure, or is not breathing, or does not have any form of a heart beat. His heart may still be receiving electrical signals but it may be in Ventricular Fibrillation (where his heart is basically shaking like crazy but not pumping any blood). The responders that answer your 911 call should be able to walk you through what to do until the Paramedics arrive. It is also probably a good idea to put 911 on speaker phone while you follow their instructions in case you need to perform CPR. Get rid of the stuff too very quickly. If he doesn't have a pulse and you cannot feel any heart beat immediately thump him in the middle of his upper chest (over his sternum) pretty damn hard. This can SOMETIMES restart the heart's rhythm. If this does not work, begin CPR IMMEDIATELY. Do not breathe for him. Just do compressions.
If you are seriously worried about overdosing because of a certain habit or recreational fun times, then you should know what to do BEFOREHAND! Be prepared! Know how to do CPR, and if you aren't absolutely positive on how to perform it correctly, research and study it. Practice it until you've got it down well, and by "well" I mean you should be able to perform it without thinking about the rhythm you are pumping at. You should have the palm of your right hand over the top of your left hand (as if you were covering up your entire left hand with you right hand), with the base of your left hand directly over his sternum for CPR. Begin compressing HARD. You should be pressing his chest down about 1.5 to 2 inches with each compression +/- a little. It is very possible that you will break his sternum. I have had it happen many, many times - more often than not. This is better than him dying so do not worry about it. Just focus on pumping his heart for him. The longer you perform CPR the more effective the blood circulation will become. This is why you do not breathe for him, because if you do then you will be forced to stop CPR, which will place you back at square one regarding his blood circulation when you resume CPR. He should have enough oxygen in his blood stream to last him until the Paramedics arrive to breathe for him, and they will almost certainly put a tube into his trachea. Tell the Paramedics exactly what you saw happen, including every detail about how long he has been seizing/not breathing/no hear beat/etc, because THEY NEED TO KNOW EXACTLY WHAT HAS CAUSED IT TO EFFECTIVELY TREAT HIS VERY LIFE THREATENING SITUATION! Perform (to the best of your ability - practice helps greatly because this is what your brain will fall back to if the shit hits the fan) 100 compressions per minute. Do not breathe for him, just keep doing compressions. CPR is VERY exhausting, even after only 5 minutes you may feel like you can't go on, so make sure the Paramedics are on the way immediately following your assessment of his vitals (whether he is breathing or has any blood circulation basically, since you probably won't have a blood pressure cuff or stethoscope with you, and in such a situation they are not necessary while he has only a few minutes before he is dead). Please take into account that this is only ADVICE and you should consult a TRAINED PROFESSIONAL DOCTOR before applying my ADVICE. I hope you make some good decisions because we are talking life and death here - and I have seen my fair share of the ugly nature of serious injury and death caused by both medical and traumatic incidents. Good luck and please stay safe with whatever you do. Remember that a few minutes spent learning how to perform effective CPR can, and probably will save someone's life if this type of situation ever occurs and you are the only one able to help him, or even the only one who knows how to perform CPR. You might be surprised at what people will do when someone near them has a heart attack. Many times they all just stand around until the Paramedics arrive. That is pretty sad.
Best of luck and share all of this information with your buddies whom you will be with. Make sure THEY KNOW what to do AS WELL! Not only you! It may be you or them who overdoses, the future is full of uncertainties so be prepared for the worst case scenario, ALWAYS! It is probably a good idea to buy a simple breathing mask online or at a local store as well, so that if you have more than one person who is conscious, one of you can do compressions and another can use the mask to breathe for him ever 4-6 seconds (I have an extra mask so I can send you one if you'd like, just contact me via PM). If he did not hit his head when/if he fell then you can tilt his head back while kneeling at his head facing his feet, and then breathe for him with the mask while tilting his head back. Make sure you know how to properly use the mask as well, they are easy to use incorrectly. You need to make a full seal around his mouth and nose.
Please be safe, your post worried me. I really don't want someone to die for some silly reason like that. Learn and practice your worst case scenarios every so often please please please, especially if you are going to be doing these things. Everyone should know how to do effective CPR. It is irresponsible and just silly for anyone to not know how to do CPR correctly. It is extremely important. Ok, I'm done. Please don't hesitate to PM me with any questions.
One more thing. It is essential that you keep your cool. Stop for 2 seconds and take a deep breath and focus on what needs to be done and do it because his life is in your hands now.
DISCLAIMER: I am expressing my opinions only in this post. I am not recommending any person act on the basis of anything said or implied here, and I assume no responsibility for any outcomes connected in any manner to this post. Furthermore, I am not establishing, nor do I intend to establish a doctor-patient relationship with any person reading this message and not in a doctor-patient relationship with me by other means. Lastly, the opinions expressed here are my own, and do not reflect the option of any other person or entity.