One key to professional conduct is to keep foremost in your mind your long term objectives and results, and to discount your short term results. Individual bad beats or lost opportunities should pale in comparison with your win rate over months and years.
When one can realize that a single large lost pot (while it sucks!) isn't a reflection of your training and skill, but rather an ephemeral occurrence, it can be easier not to overreact with swearing, throwing things, rants, etc.
One other simple way to maintain a professional appearance is to avoid table chat, entirely. I almost never comment in the chat - for good or ill - since I believe it can only work against me over time. Crying to the table over a beat, or gloating over a suck-out, can only spread a negative image of me on the site over time.
While I make notes about players such as "whiney" over lost pots, or "jerk" after a suck out, I never share those opinions, or any other information for that matter, in chat.
Wanting to be a professional equates to acting professional. Accept nothing less from yourself.