I've had bad trips before and this is how I defeated it.

Know that it is 100% mental. I believe this is true. Know that before starting to smoke. Ask your friends if they think it's all mental or not to make yourself sure. Also mood influences your high, so try to be in a happy setting with chill music and close friends.