1. Why are you in Japan? Is it a good place for you?
2. Why have you not been able to hold a programming job?
3. Why have you found it difficult "to do anything" with this or while with other companies?
4. Why are you concerned with what the Japanese people will think of other foreigners in relation to your actions?
5. How much of your savings can you recover from the company?
You seem like quite a self-aware person and yet your question lacks many of the contextual elements other people would need to help you. I think you need to talk this over with someone in person - probably someone with experience.