If your financial situation permits it, it probably makes sense to walk away before your health and/or relationships deteriorate further.
If your financial situation does not permit exiting, I'd advise you to spend all of your non work energy in changing your situation. You can do it. You really can. Getting into Amazon is not easy, there plenty of places that would be ecstatic to hire you, but the hard part is finding them. That part is kind of like dating. Its definitely about fit - we are all human after all and trying to decide if we can work together.
Easiest way to explain this situation to future employers in my opinion would be "I had a health issue that I needed to resolve, but it is now completely resolved" would probably be enough to get me as an interviewer to be satisified on any gap in employment etc. People can tell when you lie, so this would be a good strategy IMO as it is truthful.
Best of luck and remember this will pass. You will figure this out.
Rooting for you friend.