On the other hand, I developed quite a bit of anxiety and felt a little lost and depressed at times.
My advice to get the most out of your time would be: make sure the other key areas of your life are stable first (e.g. relationships, geography, finances, social life).
If you change multiple major facets of your life all at once, you are running the risk of becoming a bit untethered.
That being said, maybe it's the feeling of being untethered that catalyzes the growth in the first place.