You might be facing depression but difficult to judge as detail history is not available.
Next Steps
consult psychiatrist & discuss about your thought in detail. once your depression & nagging thoughts are under control, your sleep will improve.
Health Tips
maintain healthy lifestyle, do regular exercise & follow healthy diet
write your diary