Hi... Taking sleeping pills for sleep issues caused by a breakup is not advisable. Even Psychiatrists don't prescribe medication in such cases unless the condition is acute. Take psychological counseling/psychotherapy instead. It will help you deal with your break up and address the root cause of your stress and depression.
Next Steps
Find a good Therapist/Psychologist
Health Tips
No Medication, only Counselling. Try this Guided Sleep Meditation (https://youtu.be/TP2gb2fSYXY)