Unfortunately, an ultimatum sounds like your only choice. You have to be firm with him, or he'll keep taking pills and drinking alcohol.
You said it's either the pills/alcohol or You - can you think of a supportive way to approach the subject?
In my opinion, you should sit down with him, tell him exactly how you feel and explain that you are also his friend and don't want to see him hurt himself anymore. The way you felt when he had a seizure - just think of that, it will help you stay firm.
You CAN be supportive and firm at the same time
Now, regarding his seizures, he HAS to have a doctor involved if he's going to detox off the alcohol - it's VERY dangerous to do this without medical supervision. Also, depending on how long and how many percocet/vicodin he's been taking, he may have to have medical supervision as well - perhaps a taper plan with a doctor would help.
I wish you lots of luck, stick around here, let us know how things go. There are some really wonderful people on this board with alot of knowledge so hopefully someone else will give some suggestions
I'll keep you in my prayers - Good luck.