How can I overcome past tragedies that affect my sleep?

PTSD ? If u have nightmares , flashback , hypersrousal and avoidance , u may be having ptsd. Ssri. Can help , but cognitive behavior therapy can help also.
Behavior modifying. One place to start is practicing good sleep hygiene. Keep your sleep pattern consistently structured, avoid napping, use bed only for sleep or intimacy, and avoid lying in bed long periods without sleeping. If falling asleep is troublesome because of trouble turning off your thoughts, relaxation and imagery techniques are often helpful. For more help with these make an appointment with a therapist.
You may need help. It's not clear why people with similar tragedies take different paths after the tragedy. That is not known. After a tragedy most folks experience sleep problems (too much or even too little). In some, dreams can be so real it feels like living the tragedy all over again. "flashback" types of dreams that persist may indicate ptsd. Counseling & medication can help in that extreme case. Don't wait.