"It is worth mentioning" versus "it is worth to mention"

The first example, "it is worth mentioning that", is acceptable. The second, "it is worth to mention that", is incorrect. One might correct it by saying:

It is worth it to mention that...

Though this is a very awkward construction. A better version might be:

It is worthwhile to mention that...

As to why these particular constructions are acceptable and the others are not, I admit that I'm having a hard time figuring that out myself. I'm not even completely sure what part of speech "worth" is in each of those phrases.