We should do what any team with common sense would do and that is push Denver to the trade deadline.
Yes I wouldn't consider Gallinari absolutely essential especially if it meant getting Carmelo but if we can get Carmelo without giving him up then we should. Other than Amar'e, nobody on this team is untouchable.
Furthermore, we should stockpile as many assets as we can in the immediate here and now.
Think about it. If we can somehow land Carmelo Anthony without giving up too many key pieces, then Walsh can call New Orleans and organize a 4-player deal for Chris Paul in the off-season (Felton's expiring, Gallinari, Draft Picks, etc.)
Think about it. If we can get away with only giving up Chandler, Randolph, and Curry for Carmelo, that leaves us with Fields, Gallinari, Felton, Mozgov, Turiaf, Walker, and TD as available players for New Orleans to trade for CP3. If we give up too much in a trade for Carmelo then we might not be able to get CP3 but if we stockpile our assets...
In addition, if Gallinari does end up turning into Dirk Nowitzki then that'd be great, if not, then we can save him as trade bait. There's no reason for us to dump him to Denver when there's no deal that's imminent with any team. Granted if we're at the trade deadline and we're one player away from completing the deal then maybe you do it, but if we can swing a deal without him then we're in great shape to make a trade for a player like CP3 to create a superteam that will own LeBron's ass for years to come