If you're going to be shunned anyway, does it matter if you formally resign or if you get disfellowshipped? Absolutely it does! Here's why.
The Watchtower teaches JW's and the public that it only disfellowships JW's who commit serious or 'gross sins'. That's their Bible based excuse for shunning members who leave.
JW's are never told why someone is disfellowshipped. The Elders simply make a public announcement that 'so and so is no longer one of Jehovah's Witnesses'. Therefore, JW's often falsely assume the worst. i.e. the disfellowshipped person must have done something really bad. Otherwise they wouldn't have been disfellowshipped.
Now imagine a different scenario. You write a good resignation letter briefly outlining why you're leaving. Now you can share a copy of your resignation letter with family members and friends. Your friends and relatives can still choose to shun you if they choose to do so, but they can no longer say, 'you must have done something really bad because that's the only reason Elders disfellowship JW's.' The reasons for your resignation will be clear stated in your resignation letter!
With a good resignation letter, not only can you avoid the stigma of being disfellowshipped, you can also use your resignation letter as a powerful witnessing tool to plant serious doubt into the minds of all JW's you show it to, including your family.
By showing crystal clear reasons for leaving the Watchtower, it will be obvious that you're not guilty of 'gross sins', you're not evil, you're not immoral, and you're not an enemy of Jehovah. In fact, you can word you letter in such a way that you're putting God and the Bible ahead of obedience to humans who have no divine inspiration.
Why then should anyone shun you? You have left because you have proof that the Watchtower has rejected the teachings of God and the Bible. That proof is clearly stated in your resignation letter for all to see. If JW's choose to shun you after reading your resignation letter, that's between them and God. You have done nothing wrong.
If you know you're going to be disfellowshipped anyway, resigning with a really good letter is definitely the very best way to go.
The secret rule book Shepherd the Flock of God says, that if your JW relatives question or disagree with a disfellowshipping they can face disciplinary actions. That's another good reason for resigning. For the rest of your life you will not be disfellowshipped. You voluntarily resigned for very good reasons, - none of which were immoral, evil, or sinful.