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]
but, we also asked some behavioural questions about past experiences. we don't say it explicitly, but we're looking for responses like --- can you say some words that suggest you have demonstrated initiative at work, or you can sometimes influence others and build support for a decision rather than unilaterally doing stuff without consultation (we're $megacorp, not $startup...) . you don't need to be able to talk at length about all aspects of your past job, but you do need to be able to offer a few examples of That Time When I Demonstrated Initiative, or That Time When I Influenced The Stakeholders that can be mashed into a digestible Situation / Task / (your) Action / Result format & where you can give a few reasonable answers to follow up questions from interviewers who probe and ask annoying questions like "so, what exactly were your responsibilities?"
another thing we'd be probing for is "growth mindset" type stuff. a bad response to "if you were in a similar situation in future, what would you do differently?" is "nothing, everything i did at $oldjob was optimal". a response that shows some reflection, a willingness to admit not everything you do is perfect, and concrete ideas for improvements to behaviour or process comes across much better. no need to enumerate all your worst failings, cherry-pick and offer one or two lesser ones.
for these kinds of behavioural questions based on past experience, we didn't really care if junior / intermediate hires struggled to give strong responses. We would be a lot more concerned about poor responses to these questions for engineering managers or other positions with a leadership component.
having a prepared short form answer to "why are you applying for a job here" is also a good idea.
if you have friends or acquaintances who regularly interview folks who you can hit up for a favour, you could see if they'd be willing to conduct a mock interview and then give you feedback about things you could improve on.
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.