Those going through struggles are in a vulnerable state. As Satan waited for Jesus to be weakened (Matthew 4:2-3) he also would use this as an opportune time to take advantage of my fellow believers. There are some brothers and sisters in Christ in the church who intend to support you, building you up in truth in Christ. There are also some that are simply misguided but their are some, if we heed the warning of the bible (Matthew 7:15), that would lead you astray.
So how can you tell the difference? How can you "test the spirits" as 1 John 4:1 warns us about?
1.) Is what they are saying backed up biblically? Is what they are saying backed by the truth of scripture. I say the "truth" of scripture because the enemy will often misquote and misappropriate scriptures.
2.) Is the person displaying wisdom from above as stated in James 3:17?
One characteristic I've seen lacking in those making a claim to wisdom is they are not "open to reason" as stated in the above verse but rather they want to push their idea onto you. Then, when countered with scripture accurately they do not reason as one seeking the truth but rather redirect...just like Satan did (Matthew 4:3-8).
3.) What fruit do they bear?
Jesus said you will know a tree by it's fruit. If they bear bad fruit, they are a bad tree, therefore DO NOT listen to their council. "But can't they still have something to offer that's good?" NO! Notice Jesus stated a bad tree cannot bear good fruit.