Something I've learnt is to always anticipate your experience to be stronger than you should expect. If you're taking 25mg of 2C-T-7, predict for a 30-35mg experience when choosing where to have your trip and if combining a powerful psychedelic with other drugs, either be at home supervised or wait until you are feeling the full effects before taking anything else so you can judge if it's safe to take other drugs or not.
It's sad to hear you had such a horrible experience, but these things happen if we don't care. Most people make some mistakes and gets into bad settings, or tries a bad combo etc at some point - I've had my share of bad experiences like this. The important thing is just to learn from this and be more careful in future.
Also, if you're out in public with friends, make sure they know you're on something, more specifically what you're on and how it might affect you - but even if a light trip is expected, make sure they keep an eye on you. In the tripping state it might be hard to spot your friend, but they should be able to find you just as easily as ever. They should regularly ask you how you're feeling, and if you started freaking out like you did they should immediately take you home and make sure you're safe and supervised for the rest of the trip.
I think the most telling and important thing I saw in your report was the words "about 25mg". What do you mean "about"?
If you mean you eyeballed the powder then that's where you went wrong. The human eye cannot discern between amounts so small. You can have three piles, 15mg, 25mg and 40mg sitting next to each other, and they can all look pretty much the same depending on the spread of the powder.
You
need to measure your doses.
If you don't have a milligram scale, then there's the alternative of
Liquid Measurement.
Just remember for liquid measurement you need to know the total weight you have to begin with, and unless your friend weighed it up for you it's unlikely you know, since occasionally vendors will send a little less than you asked for - but even more commonly they will send you a little extra so you're more likely to use the vendor again. I've previously received a bag of 2C-E that was supposed to be 250mg and was like 380mg.. Had I just assumed it was 250mg and used liquid measurement, if I wanted a high dose of 25mg, I'd have ended up dosing 38mg which is many many times more intense.