It is obvious that Antonio is, indeed, suffering from melancholy in William Shakespeare's play The Merchant of Venice; however, the exact cause of his melancholy is not as obvious. He has friends (a fact that is demonstrated many times throughout the play) as well as enemies; he has money and he loses money; he likes to give but he is also driven to make money. All of these are elements which might cause conflict for a man, so several things are possible contributors to his melancholy state.
First, though he would like to, Antonio is unable to loan his friend, Bassanio, the money he wants to court Portia. Unfortunately, Antonio agrees to secure any loan Bassanio gets from anyone else and ends up in debt to his kind-of enemy, Shylock, a spiteful usurer who will eventually demand "a pound of flesh" from Antonio.
Second, all his ships (which are, of course, the source of his income) are at first loaded with goods which will provide him a handsome profit; however, Antonio eventually loses everything. This would certainly be cause for anyone to feel a sense of despair.
The final cause of Antonio's melancholy might stem from a kind of internal conflict between his natural tendency to be generous and his constant need, as a merchant, to make money. This dichotomy would, perhaps, cause the kind of melancholy Antonio demonstrates throughout the play.
Whatever the cause, Antonio is a sad figure in this play. He says of himself:
I hold the world but as the world...
A stage where every man must play a part
And mine a sad one.