As soon as a child can walk and perhaps climb it is time to think about gun safety in terms of preventing access to both guns and ammunition, locking both up separately. Later it is time to talk to kids about what to do if they encounter a gun at a friends' house. It is all too common in injuries or fatalities involving guns and children.
Here is a good site with advice on gun safety:
Tips for Gun Owners, California Department of Justice
Speaking as a grandma, it is just as important for extended family members to educate themselves if children visit their home.
Speaking as a survivor of attempted suicide, if you or a family member is depressed or suicidal, it is a good idea to leave any guns or lethal medications with others until you have recovered. With guns around it is all too easy to use them when you have a very bad day or hit a low point in your depression. In my experience, I may feel much better the following day or even a few hours later. How tragic to end my life suddenly when my mood would improve so soon and the pain returned to a more manageable level.