Eating an edible or vaping 🍬🍪

So I have a 6 week old daughter. I have had bad trips of anxiety and sadness due to being a newly single mom and the dad is no longer in the picture. Some days I think of going to buy and edible or vape instead of seeking pills for depression. I live in California where marijuana is now recreationally legal. Is it possible to lose custody if the courts were to find out? I don’t plan on telling anyone if I go down that road. It’s been really hard and stressful I love my baby and would never expose her to marijuana. Also she is bottle fed since my breast milk supply died of all the stress I went through with my ex. I have previously smoked pot and had edibles before I was pregnant and stopped when I found out I was gonna be a mom. When I have used in the past I had full self control and was fully/mentally aware of what I was doing. So that wouldn’t keep me from taking care of my baby. I think drinking and getting drunk is million times worse because it fully impairs your body but vaping or eating an edible doesn’t do that. What are your thoughts? I live with my mom there is someone here 24/7 and I have a doctors rec/card.