Xhaka asked for a transfer in January after being stripped of the captaincy and falling out with the club's supporters.
But Arteta refused and Xhaka has since become one of the Gunners' best players after the restart.
"Everyone knows what happened with me and the fans - or the fans with me. It was not a good time. It was not a nice time," he told BT Sport.
"But maybe it was the key because I came back stronger than ever, so I learned a lot from this situation. I hope the fans have too.
"I was always saying to myself, but to the fans too, I am a guy that will go 100 per cent each game. The people start to understand me more and more now again.
"I have to be honest, I'm very honest with everyone. I was very, very close to leaving the club. I had, until this moment, had a great, great time in this football club.
"But after this, I was of course a bit down because I did not expect that from the people, from the fans.
"It was never in my mind to leave the club before, but after this happened, of course you think about it."
He added: "When Mikel arrived, I had a very good meeting with him, very good conversations.
"Mikel was the guy. He turned me around and gave me a second chance, and he showed me he trusted me and I have tried to give him everything back."