(*note that I'm not a neuroscientist or a psychologist. This is just based on my own limited understanding of this subject based on a bit of my own research, and experiences, along with what we covered in both social psychology and cognitive neuroscience)
Psilocybin mushrooms have shown some promise in treating depression, though I'm not so sure about PTSD. The effects of both PTSD and depression require more research. They also have the potential to induce PTSD-like symptoms, usually as a result of trauma from having a bad trip. Shrooms have been found to potentially provide more long-term relief from depression symptoms though, potentially lasting as 12 months.
Part of the therapeutic effects may have to do with them disrupting the Default Mode Network (DMN). The DMN refers to the parts of our brain that become active when we are in a resting state and is anticorrelated with the central executive network (CE). Your CE becomes active when you are actively engaged in higher-order cognitive tasks (e.g. attention, working memory, etc) while your DMN becomes active during rest. Your DMN is involved in self-referential thinking, autobiographical memory, moral decision-making, theory of mind, envisioning the future, etc. Overactivity in the DMN also seems to be correlated with a number of mental illnesses, including depression and PTSD. Psychedelics, such as psilocybin mushrooms, seem to decrease DMN activity, which may explain why they are commonly reported to help with managing symptoms associated with certain mental illnesses. This also goes into why they lead to a loss of self, as the DMN plays a crucial role in self-referential thought.
While I'm not mentally ill, I have found that they have helped me get out of a rough spot I was going through mentally and do help me a lot when it comes to managing my suicidal ideation (I still plan on ctbing but I'm not being plagued by constant distress over intense suicidal thoughts anymore).
If you want to use them without straight-up tripping, then I'd recommend microdosing. If you want to try tripping, then try starting somewhere around 1-1.5g first. Also, try to avoid stronger strains your first time around, such as Penis Envy and Blue Meanies. Golden Teacher is the most commonly recommended strain for beginners. I personally used Alc Squat during my first few trips. You could try buying some microdosing capsules or you could make your own.
You shouldn't use them if you have a history or family history of psychosis since, like with other psychedelics, they have the potential to cause an onset of psychosis. If you aren't predisposed to psychosis then you should be good.