Pursuant to section 525(a) of the bankruptcy code a government agency cannot deny, revoke, suspend or refuse to renew a license to a person who has filed for bankruptcy, solely due to their filing for bankruptcy. This means that you will not lose your license to practice your profession due to filing, but it does not mean that you won't lose your license for related reasons if you have violated the standards of your profession.
For example, an attorney in Texas lost his license to practice law based on his failure to comply with a debt management plan and eventual bankruptcy. The Court relied on the questions his poor debt management raised about whether he could demonstrate that "he was a person of good moral character." The decision was not solely due to his bankruptcy, but the "good moral character" standard used by the Court was so vague as to give the bar great leeway in denying a license.
Regardless of whether you are forced to file bankruptcy, you should refer to the specific standards and requirements of your profession and ensure that you comply with those standards and requirements to avoid a similar fate.