i think one of the beauties of psychedelic drugs is being able to confront parts of your mind that worry you, frighten you, etc, and work them out
learning about yourself and working your problems out, are things to do in a good trip when you feel your invincible happiness and you can think about your life detachedly
a bad trip you might be able to learn from, but i think ultimately it changes you for the worse. flashbacks and hppd are mainly related to bad trips, and many unwanted subtle changes can occur after a bad trip, whereas you might have an afterglow for quite a long time after a good trip
i consider a bad trip any trip that leaves you worse than when you started. this would be trips where you overflow with fear, agitation, anxiety, guilt, anger, and have a lost feeling, where you cannot find your way out, and the only thing you want is for it to end, but the clock ticks take minutes and each clock tick is so loud it spirals you into agitation