Does word "confidence" have the same meaning in the following two sentences?

After that failure he lost his confidence.

Everyone trusted him with their confidences.
different meanings