Earlier quoted context omitted.
Reads like amphetamine psychosis. Been there.
How did you recognize it in yourself, and how did you overcome it?
Recognize: self-reflection after brief periods where I wasn't taking amphetamines.
Glib as it is, that's basically it. Prescribed by a doc at 15. Used them for a decade. After reflecting on my actions and the person I was, it brought me deep shame.
If you're wondering if you've fallen into psychosis, I recommend keeping a journal for a month. Write your thoughts and reflections for the day inside. Then, a month or two later, take a break from the stims, and re-read what you've written. If you come off as psychotic then you have your answer.
The journal was my first real clue that something was amiss; but really, anything that records your behavior works too (e.g. text messages, Slack messages, blog posts, emails, phone recordings, audio recordings, video recordings, etc.).