I know this is an old thread, but I felt I had to reply to it just because it shocked the hell out of me.
Firstly, know what you're taking. This doesn't sound like the 6-APB I tried the other day, and either could have been mislabeled - legal highs are as all over the shop as illicit drugs. Don't assume you know what you're taking just because you have the name of it written in front of you. Secondly, do some research A FEW DAYS before you take it. This way, you'll have time to find out about what to expect and what could go wrong, and crucially, you'll be sober enough not to flip the fudge out. You'll give yourself a choice. Next, taking loads of drugs and going on drug binges is one of my favorite things to do, and I'll admit that. But don't just blindly pile stuff on top of stuff for days on end! Know your tolerances, your reactions. I have a little group of 'soft' drugs that I'm on a hell of a lot of the time (marijuana, tobacco, alcohol, propranolol, caffeine) but I'd still recommend generally waiting to come up on any unknown substance before trying to mix anything, even this soft stuff, and even then, bloody cautiously. Little sleep, little food, few liquids and a whole shed-load of drugs is not only silly, it'll taint the purity of the high. Not that people shouldn't or I don't take piles of drugs, but you can't expect a positive response from an unknown element in so much physical and psychological chaos.
Next point - where was your watcher? If you're taking a new drug, especially on top of a pile of other drugs, you need someone more immediate you can turn to if things go wrong - not an ex, not a phone-call, someone who can literally hear you from the next room, or preferably, someone who is in the room with you. Things go wrong with drugs. That's the problem with treating the body more like a playground than a temple. Look after yourself - have someone to look after you if you can't. And on that note - if you're feeling that crappy after taking something, go to a hospital. You described near-psychosis and an incredibly rapid heartbeat and you'd taken an unknown drug after a few days of being crazy-drug-fucked. That is not a good time to sit around worrying about things getting better or worse, or trying to self-medicate - it's the time to get your arse to the emergency room of someone who knows what the hell is going on. I get that this freaks some people out and seems like an overreaction, but seriously, this is your health and your life - print out all the info you can find and take it and the packet to the hospital. Whilst there, point the doctor you're seeing in the direction of Erowid and this forum. Seriously. It sounds like you're telling them they don't know what they're doing, but when I was doing some research for my undergrad dissertation I asked a local GP where he goes when he comes across a patient who has consumed a drug they're not familiar with - he said Wikipedia.