Whenever you want to give advice to someone, please don't do it halfheartedly. Instead you'll do these 3 things:
1. LISTEN
https://www.google.com.ph/url?sa=i&source=images&cd=&cad=rja&uact=8&ved=2ahUKEwjF2pOgtY3fAhXT7GEKHTMtBaYQjRx6BAgBEAU&url=https%3A%2F%2Fwww.tumblr.com%2Ftagged%2Fdewy%2Bskin&psig=AOvVaw3soHIgLPdp6d0tV0RnP27q&ust=1544261693943577
Listen to their problems, absorb their words and the pain behind it after that;
2. UNDERSTAND
https://www.google.com.ph/url?sa=i&source=images&cd=&cad=rja&uact=8&ved=2ahUKEwiEqrqItY3fAhUK_GEKHVIrChcQjRx6BAgBEAU&url=https%3A%2F%2Fweheartit.com%2Fdul2030%2Fcollections%2F108173337-travel-places-vacation&psig=AOvVaw2MZHoK40aa9X0wFK-sYJMJ&ust=1544261645272609
Put yourself into their shoes. Don't be such a hypocrite. Don't let them feel that their problems aren't as big as you're facing right now. Don't belittle them because their being too emotional or overreacting. Instead put yourself into their situation, feel their pain even just for a little bit, enough for you to understand what they are trying to say – that's what you called empathy.
3. Lastly, EMBRACE THEM WITH TRUE AND PURE WORDS
https://www.google.com.ph/url?sa=i&source=images&cd=&cad=rja&uact=8&ved=2ahUKEwjehZyWtY3fAhUYMt4KHYMfDRkQjRx6BAgBEAU&url=https%3A%2F%2Ftwitter.com%2F__N_O_o_R%2Fstatus%2F839600397820039168&psig=AOvVaw0wefSFCskrEGK9gxlT3VAr&ust=1544261674426779
I don't want to say "good words" because it's already overrated and not so real to tell. Instead, let's be straight forward.
Tell them you understand them and why are they so sad. After that, tell them your own opinion. You can be rational and reasonable as much as you want but don't be so one-sided. We, people had the ability to understand each other. Let's use them in a good way. God gave us knowledge not just to use it for basic purposes but also to understand other human's mind and emotions. Be open-minded. We should always ready to open our minds in understanding other people.
To give an advice isn't really easy especially when you also need that for yourself too. But remember giving kindness to all people doesn't cost anything. You can be kind to everyone as much as you can but don't let your guard down also.