Answer: Unfortunately, there really isn't a one size fits all solution to most gardening problems. Based on the information in your question I am not certain what is wrong with your plants. You really need to have a firm diagnosis first and then decide the best way to handle the problem. But here are some suggestions.
Tomatoes that rot can be caused by many different things. One common one is blossom end rot where the bottom of the tomato turns black. This can be prevented by keeping the soil evenly moist all the time, meaning damp like a wrung out sponge --not sopping wet/saturated and never dried out. There are also disease problems such as anthracnose that can cause spotting and rotting along with yellowing foliage. This can be combatted somewhat by removing the foliage from the base of the plant, replacing the mulch with fresh mulch, and avoiding wetting the foliage when you water. And, never place the tomatoes on the ground, pick them and put them into a clean container. Another possibility is that they are too ripe before you pick them, or you are trying to keep them too long. Home grown tomatoes really do not keep long at all, maybe a day or two.
The pumpkins could be suffering a from a variety of problems as well. It might be mildew which happens under certain weather conditions, or it might be related to squash bug infestation. I would suggest you work with your local county extension to identify the problem(s) and based on knowing that, decide how to proceed. They may appreciate photos of the overall plant and closeups of the affected parts, or freshly cut samples of the affected foliage enclosed in a plastic bag and kept cool. If it is something that can be treated, they will have the most up to date information on what to use and how/when is best to apply it for maximum results.
I'm sorry I can't be more specific for you long distance, but I hope this helps you begin troubleshooting.
Q&A Library Searching Tips