struggling with breakup

I am having a hard time getting over my ex. It's been almost 3 months and I've been so depressed,seeing him just made it so much worse and now I feel heart broken all over. I want to be his friend so badly like he requested just so I can have a piece of him still but I know it isn't healthy. I can't watch him move on or enjoy life with other girls ,be friends with him on social media ,etc. I just know I still love him and want it to work I'm not mentally able to give him this weird friendship so now I'm just at a cross road. Have you ever been through this ,what did you do and how to cope or get through this situation