Your mindset, which includes conscious and unconscious expectations and goals, how you're feeling around the time of the experience (depressed? anxious? indifferent? curious? hesitant?), how you feel about the people around you, any mental issues you may have, and how you approach the experience.
To maximize the chance of having a productive experience you'll want to make sure each of those elements is as helpful to your goals as possible.
What the appropriate set is will also depend on your setting, which includes not just the physical environment, but also what's happening there, and the people around you and their own mindsets and attitudes towards what you're going through, their ability to facilitate the experience, etc.
For example, while generally one is discouraged for partaking in psychedelics if one suffers from mental illness, in the context of psychedelic therapy with a trained therapist you like, trust, and respect, that could work for certain conditions.
But if you do have a mental illness please consult a trained, professional therapist before making a decision on this matter.