I think you are someone who would benefit from mindful meditation.
We're all on the journey of life and there will be hiccups. You got to spend a few months in this beautiful country and have beautiful experiences that you'll always remember. Don't let leaving ruin the experience and overshadow what you WERE able to do.
I have co-dependency issues that have prevented me from studying abroad when I was in uni. I am not even allowed to stay by myself for a week if it means I am home alone and not doing anything of significance. When I was IN university I couldn't even spent 6-8 hours alone without doing something dumb or panicking. (I was also seeing my pdoc every 2 weeks...x_x) Even though I had those restrictions on myself, I still see those years with fondness. I want you to challenge yourself and still see the good despite the abrupt end. I'm actually jealous that you were able to spent all that time BY YOURSELF in ANOTHER COUNTRY because I still have those opportunities but I'm too fearful of attaining them.
I have hope that I will learn to deal with myself and gain the independence for travel. I have hope that you will achieve your goals, even if it takes a little longer. Persistence is key, even if there are some hiccups along the way.