i have thought about this too
from what people on here have said, the risk of becoming a heroin addict is extreme
once you do heroin once, it rewires your brain and the desire for heroin becomes similar to the desire for water. Heroin is expensive and people will often turn to crime to get it.
it's probably best to avoid trying to use it because heroin addiction is awful and painful. Imagine if you could never have bread, potatoes, chips, or candy forever and had a constant headache unless you had potato chips. Heroin cravings are similar to cravings like "I need water" or "I have to go to the bathroom." The need is primal and your brain does not go "oh this is illogical and so I don't feel it." Instead, it's just as real as needing water, just as real as the "I really need to piss, it hurts." There are better alternatives like ketamine if you are depressed and want to try extreme treatments.