Obviously complaining about the company or my personal situation at that time to a new prospective employer is an absolute no go. With how long I stayed it's virtually impossible to talk about older roles or just blitz my way through listing out the technologies I used; I have to talk about this one role, in detail, multiple times with every company.
Has anyone else had to deal with a similar issue? What kind of solutions did you come up with for it and have you done anything since to ensure you don't wind up in similar situations again.
2) Think about the opportunities that your previous job gave you. Specifically opportunities. Every time a negative thought comes up, ask "What was my opportunity at that moment?" and write down your answer. Opportunity to disagree and commit? Great. Opportunity to solidify your understanding of your own values? Great! Opportunity to challenge yourself and work on something outside of your comfort zone? etc. Write those down and brag about them to your next amazing job!
Or a therapist because the experience has a negative impact on the ability "to function" to the degree that finding a job is "functioning."
["Scare quotes" to clarify I am not making value assumptions about the OP]
There's no secret, actually. Be kind and be honest.
Practice it. Write the answer. Go over it for 20 hours. Treat it like a presentation because it is. I go so far as to make an AI "interviewer" in Vapi so I can voice it out, and you can mod the tone to be supportive, indifferent, sarcastic, etc.
If you're disappointed with yourself, say that. Humans make mistakes. Someone out there started smoking or drinking once. Someone had an affair. You don't know which of your interviewers did which, but you can assume that everyone has done something they knew was a bad idea.
It's also reasonable to assume that an applicant is leaving for reasons. Bored? Wants more money? That's a pretty bad reason. Unhappy? That's a much better reason. What's the catch? Why is this property on the market for cheap? A trick is to imply what people want to hear - you're looking to work with smarter people, better processes, get your shit together, etc.
While you don't want to lie about your qualifications, achievements, titles, responsibilities, I don't see an issue with inventing a story to get these points across. It doesn't matter.