How can I do research mathematics without enrolling at a university?
If I understand you correctly, then you long for the access to journals and fellow researchers coming with a university affiliation, but the intensity and committment of being a graduate student has turned out to be bad for you.

It is uncommon, but not entirely unusual, for individuals to be associated with a research group at a university on such level. This might come in some formalized arrangement, eg with a title like "Honorary Research Fellow", or just be handeled by some informal arrangements. Common perks would include access to mathematical journals via the university and being on the mailing list for the local seminars. You may or may not be permitted to claim the university as affiliation when submitting papers, but I believe that this is a very minor aspect anyway.

If you can find a research group, ideally in your geographical area, that is interested in your kind of questions, then it would not be unreasonable to contact them and ask whether this is a possibility. Do brace for the potential of rejection (or being ignored) though.

Whether you personally have a change to produce publishable research in such an environment, or whether this would be benificial or detrimental to your mental health is something we cannot judge here.